2026-10-18 12:09:54 +02:00
|
|
|
CREATE TABLE fixture_item (
|
|
|
|
|
id integer PRIMARY KEY,
|
|
|
|
|
name text NOT NULL
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
INSERT INTO fixture_item (id, name) VALUES (1, 'one'), (2, 'two');
|
2026-10-18 17:40:59 +02:00
|
|
|
|
|
|
|
|
CREATE TABLE grid_parent (
|
|
|
|
|
id integer PRIMARY KEY,
|
|
|
|
|
name text NOT NULL
|
|
|
|
|
);
|
|
|
|
|
INSERT INTO grid_parent (id, name) VALUES (1, 'alpha'), (2, 'beta'), (3, 'gamma');
|
|
|
|
|
|
|
|
|
|
CREATE TABLE grid_child (
|
|
|
|
|
id integer PRIMARY KEY,
|
|
|
|
|
parent_id integer,
|
|
|
|
|
note text
|
|
|
|
|
);
|
|
|
|
|
INSERT INTO grid_child (id, parent_id, note) VALUES (10, 1, 'c1'), (11, 2, 'c2'), (12, 3, 'c3');
|
|
|
|
|
|
|
|
|
|
CREATE TABLE grid_composite (
|
|
|
|
|
a integer,
|
|
|
|
|
b integer,
|
|
|
|
|
val text,
|
|
|
|
|
PRIMARY KEY (a, b)
|
|
|
|
|
);
|
|
|
|
|
INSERT INTO grid_composite (a, b, val) VALUES (1, 1, 'x'), (1, 2, 'y'), (2, 1, 'z');
|
|
|
|
|
|
|
|
|
|
CREATE TABLE grid_nopk (
|
|
|
|
|
x integer,
|
|
|
|
|
y text
|
|
|
|
|
);
|
|
|
|
|
INSERT INTO grid_nopk (x, y) VALUES (1, 'a'), (2, 'b');
|