Sha256: 237850dc402850200793aef4dfc69f5cc8873bdd6884e2ebe10bbb294c160c4e
Contents?: true
Size: 593 Bytes
Versions: 18
Compression:
Stored size: 593 Bytes
Contents
class TrafficOwnerIdsAreSerials < Landable::Migration def up execute <<-SQL SET search_path TO #{Landable.configuration.database_schema_prefix}landable_traffic,public; CREATE SEQUENCE owners_owner_id_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; SELECT setval('owners_owner_id_seq', (SELECT max(owner_id) FROM owners)); ALTER SEQUENCE owners_owner_id_seq OWNED BY owners.owner_id; ALTER TABLE owners ALTER COLUMN owner_id SET DEFAULT nextval('owners_owner_id_seq'::regclass); SQL end end
Version data entries
18 entries across 18 versions & 1 rubygems