A postgresql column which is non-null and unique is treated with
the same optimisations as a primary key, so we have no need to
try and recreate the id
as the primary key.
No read paths are impacted by this change, and the database will automatically create an ID for each insert. Thus, no code needs to change.
FZR7ET5DMHNNGB24QVFVVTGT3F6OKGG4PX7HW2YLJPBAUDVNJJHQC
MWXDVTS3V6SLJ27SJUVN3LT34H3ZMLHPYQCDV7C6KPLHV2QTEF7QC
JM3DPYOMVNMCL5GMEYC3Y4NDRGTNIFBBFTPGPVT66GPENVPU7EVQC
X27GNHDV5KPZ5GSH6DCAJMNCEMZLCP7M43JWF2X3O5QWXMOX273AC
IGR322YPZG7IX33I6CSF4ZIHFKXCT4ERC2LC73MW6PN7W53D73BAC
SB2V735VJ2CDHGCXRUA5FOYHDRXQFVOZ3KXC3YKXWRNW6DIX7RXQC
FYO6NECE4YJC76HQIG35NNJABODV7KNQKREK5YKZU6O2MNNSQTMAC
W5OAZWPDZOGVAL5P4ROVZSZGCSJBMPRALW6SCGV6L7A5DBAK2JLQC
KN3VYE5P2RJB3KZ355LA5C2T2D5S2IR3QZFE53AJIWUVMETEEYDAC
N22GPKYTOLZLBGTGDATQDVZ4R5APZEAOIA7L32X4UXBH4XNI7MWAC
D5QIOJGPKQJIYBUCSC3MFJ3TXLPNZ2XMI37GXMFRVRFWWR2VMTFAC
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-09 15:21:11
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FVP1/AWjdKTlY6djrG592A
# Created by DBIx::Class::Schema::Loader v0.07049 @ 2020-02-09 15:25:17
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1CMOaLf9fYRdJBlYiivmxA
__PACKAGE__->add_column(
"+id" => { retrieve_on_insert => 1 }
);
-- will automatically add unique IDs to Jobsets.
ALTER TABLE Jobsets
ADD COLUMN id SERIAL NOT NULL,
ADD CONSTRAINT Jobsets_id_unique UNIQUE (id);