-- 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 wafer_test_id_seq;
CREATE SEQUENCE	wafer_test_id_seq;
ALTER TABLE wafer_test ALTER COLUMN id SET DEFAULT nextval('wafer_test_id_seq');
ALTER SEQUENCE wafer_test_id_seq OWNED BY wafer_test.id;
ALTER SEQUENCE wafer_test_id_seq RESTART WITH 89577; -- no easy way for user variables in PostgreSQL
