START TRANSACTION;

CREATE SEQUENCE bot_big_order_id_seq;
ALTER TABLE bot_big_order ALTER COLUMN id SET DEFAULT nextval('bot_big_order_id_seq');
ALTER SEQUENCE bot_big_order_id_seq OWNED BY bot_big_order.id;
SELECT setval('bot_big_order_id_seq', COALESCE(max(id), 1)) FROM bot_big_order;

COMMIT;
