File: init_schema.sql

package info (click to toggle)
slony1-2 2.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 8,836 kB
  • ctags: 5,283
  • sloc: ansic: 21,239; sh: 13,008; sql: 11,299; xml: 9,172; perl: 2,803; yacc: 2,698; lex: 1,356; makefile: 747; awk: 24; lisp: 8
file content (8 lines) | stat: -rw-r--r-- 383 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
-- 

create table table1 (id serial primary key, data text);
create table table2 (id serial primary key, data text);

create table table1a (id serial primary key, table1_id int4 references table1a(id) on update cascade on delete cascade, data text);
create table table2a (id serial primary key, table2_id int4 references table2a(id) on update cascade on delete cascade, data text);