summaryrefslogtreecommitdiffstats
path: root/db_demo/sql/tables/cr_tbl_test.sql
diff options
context:
space:
mode:
Diffstat (limited to 'db_demo/sql/tables/cr_tbl_test.sql')
-rw-r--r--db_demo/sql/tables/cr_tbl_test.sql5
1 files changed, 3 insertions, 2 deletions
diff --git a/db_demo/sql/tables/cr_tbl_test.sql b/db_demo/sql/tables/cr_tbl_test.sql
index 15e94d0..63b861b 100644
--- a/db_demo/sql/tables/cr_tbl_test.sql
+++ b/db_demo/sql/tables/cr_tbl_test.sql
@@ -1,7 +1,8 @@
CREATE SEQUENCE seq_test START 1;
CREATE TABLE tbl_test (
- key integer PRIMARY KEY, -- primary key
+ key integer DEFAULT nextval('seq_test') PRIMARY KEY, -- primary key
personid integer NOT NULL REFERENCES tbl_person(key), -- person foreign key
- gametypeid integer NOT NULL REFERENCES const_gametype(key) -- gametype foreign key
+ gametypeid integer NOT NULL REFERENCES const_gametype(key), -- gametype foreign key
+ inserttime timestamp DEFAULT current_timestamp -- time of insertion
); \ No newline at end of file