Revision 2dd0ba1d
Von Bernd Bleßmann vor 9 Monaten hinzugefügt
SL/DB/MetaSetup/FileVersion.pm | ||
---|---|---|
doc_path => { type => 'text', not_null => 1 },
|
||
file_id => { type => 'integer', not_null => 1 },
|
||
file_location => { type => 'text', not_null => 1 },
|
||
guid => { type => 'text' },
|
||
guid => { type => 'text', not_null => 1 },
|
||
itime => { type => 'timestamp', default => 'now()', not_null => 1 },
|
||
mtime => { type => 'timestamp' },
|
||
version => { type => 'integer', not_null => 1 },
|
||
);
|
||
|
||
__PACKAGE__->meta->primary_key_columns([ 'file_id', 'version' ]);
|
||
__PACKAGE__->meta->primary_key_columns([ 'guid' ]);
|
||
|
||
__PACKAGE__->meta->allow_inline_column_values(1);
|
||
|
sql/Pg-upgrade2/file_versions_guid_as_primary_key.sql | ||
---|---|---|
-- @tag: file_versions_guid_as_primary_key
|
||
-- @description: guid-Spalte als Primärschlüssel
|
||
-- @depends: release_3_6_0 file_version
|
||
|
||
ALTER TABLE file_versions
|
||
DROP CONSTRAINT file_versions_pkey,
|
||
ADD UNIQUE (guid),
|
||
ADD PRIMARY KEY (guid);
|
Auch abrufbar als: Unified diff
file_versions: Spalte guid als Primärschlüssel