Revision 7a778ade
Von Jan Büren vor mehr als 2 Jahren hinzugefügt
SL/DB/MetaSetup/OrderVersion.pm | ||
---|---|---|
11 | 11 |
__PACKAGE__->meta->columns( |
12 | 12 |
email_journal_id => { type => 'integer' }, |
13 | 13 |
file_id => { type => 'integer' }, |
14 |
final_version => { type => 'boolean', default => 'false' }, |
|
14 | 15 |
itime => { type => 'timestamp', default => 'now()' }, |
15 | 16 |
mtime => { type => 'timestamp' }, |
16 | 17 |
oe_id => { type => 'integer', not_null => 1 }, |
sql/Pg-upgrade2/oe_version.sql | ||
---|---|---|
4 | 4 |
-- @ignore: 0 |
5 | 5 |
CREATE TABLE oe_version ( |
6 | 6 |
oe_id integer, |
7 |
version integer, |
|
7 |
version INTEGER NOT NULL, |
|
8 |
final_version BOOLEAN DEFAULT FALSE, |
|
8 | 9 |
email_journal_id integer, |
9 | 10 |
file_id integer, |
10 | 11 |
itime TIMESTAMP DEFAULT now(), |
... | ... | |
13 | 14 |
FOREIGN KEY (oe_id) REFERENCES oe (id), |
14 | 15 |
FOREIGN KEY (email_journal_id) REFERENCES email_journal (id), |
15 | 16 |
FOREIGN KEY (file_id) REFERENCES files (id)); |
17 |
|
|
18 |
CREATE TRIGGER mtime_oe_version BEFORE UPDATE ON oe_version FOR EACH ROW EXECUTE PROCEDURE set_mtime(); |
Auch abrufbar als: Unified diff
Hilfstabelle oe_version erweitert