-- changes id to serial type, starting with next-to-last value 
-- WHICH HAS TO BE ADDED IN BY HAND (last id from table + 1):
DROP SEQUENCE IF EXISTS mcm_test_id_seq;
CREATE SEQUENCE	mcm_test_id_seq;
ALTER TABLE mcm_test ALTER COLUMN id SET DEFAULT nextval('mcm_test_id_seq');
ALTER SEQUENCE mcm_test_id_seq OWNED BY mcm_test.id;
ALTER SEQUENCE mcm_test_id_seq RESTART WITH 48069; -- no easy way for user variables in PostgreSQL
