File: ddl.sql

package info (click to toggle)
pgcopydb 0.17-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 30,636 kB
  • sloc: ansic: 217,474; sql: 1,654; sh: 812; makefile: 365; python: 94
file content (15 lines) | stat: -rw-r--r-- 636 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
---
--- pgcopydb test/extensions/ddl.sql
---
--- This file implements DDL changes in the test database.

begin;
-- Create new tables with foreign key relationships to test
-- the query for `schema_list_extensions()`
create table one (id int primary key, two_id int);
create table two (id int primary key, one_id int, three_id int);
create table three (id int primary key);
alter table one add constraint one_two_fk foreign key (two_id) references two(id);
alter table two add constraint two_one_fk foreign key (one_id) references one(id);
alter table two add constraint two_three_fk foreign key (three_id) references three(id);
commit;