Skip to content

Commit 9ce1e9f

Browse files
committed
test: ensure dropped columns case is tested
Ensure the `if (att->attisdropped)` branch is tested, by adding new columns in the fixtures and then dropping the with `ALTER TABLE projects DROP COLUMN project_name`.
1 parent 07eadf6 commit 9ce1e9f

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

test/init.sql

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
CREATE TABLE projects (
2-
id integer,
3-
name text,
4-
client_id integer
1+
CREATE TABLE projects
2+
( id integer
3+
, name text
4+
, project_name text
5+
, client_id integer
6+
, subclient_id int
57
);
8+
-- ensure these dropped column cases are tested
9+
ALTER TABLE projects DROP COLUMN project_name;
10+
ALTER TABLE projects DROP COLUMN subclient_id;
11+
612
INSERT INTO projects VALUES (1, 'Windows 7', 1);
713
INSERT INTO projects VALUES (2, 'has,comma', 1);
814
INSERT INTO projects VALUES (NULL, NULL, NULL);

0 commit comments

Comments
 (0)