Skip to content

Commit

Permalink
[DAT-17590] Fix tests for 3.16.0 driver version (#833)
Browse files Browse the repository at this point in the history
Fix tests for 3.16.0 driver version
  • Loading branch information
vitaliimak authored Jul 2, 2024
1 parent d85f032 commit aad29a6
Show file tree
Hide file tree
Showing 39 changed files with 76 additions and 76 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ALTER TABLE LTHDB."PUBLIC".authors ADD varcharColumn VARCHAR(25)
ALTER TABLE LTHDB."PUBLIC".authors ADD intColumn INT
ALTER TABLE LTHDB."PUBLIC".authors ADD dateColumn date
UPDATE LTHDB."PUBLIC".authors SET varcharColumn = 'INITIAL_VALUE'
UPDATE LTHDB."PUBLIC".authors SET intColumn = 5
UPDATE LTHDB."PUBLIC".authors SET dateColumn = '2020-09-21'
ALTER TABLE LTHDB.PUBLIC.authors ADD varcharColumn VARCHAR(25)
ALTER TABLE LTHDB.PUBLIC.authors ADD intColumn INT
ALTER TABLE LTHDB.PUBLIC.authors ADD dateColumn date
UPDATE LTHDB.PUBLIC.authors SET varcharColumn = 'INITIAL_VALUE'
UPDATE LTHDB.PUBLIC.authors SET intColumn = 5
UPDATE LTHDB.PUBLIC.authors SET dateColumn = '2020-09-21'
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ALTER TABLE LTHDB."PUBLIC".posts ADD CONSTRAINT fk_posts_authors_test FOREIGN KEY (author_id) REFERENCES LTHDB."PUBLIC".authors (id)
ALTER TABLE LTHDB.PUBLIC.posts ADD CONSTRAINT fk_posts_authors_test FOREIGN KEY (author_id) REFERENCES LTHDB.PUBLIC.authors (id)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE LTHDB."PUBLIC".authors_data AS SELECT DISTINCT email AS authors_email FROM LTHDB."PUBLIC".authors WHERE email IS NOT NULL
ALTER TABLE LTHDB."PUBLIC".authors_data ALTER COLUMN authors_email SET NOT NULL
ALTER TABLE LTHDB."PUBLIC".authors_data ADD PRIMARY KEY (authors_email)
ALTER TABLE LTHDB."PUBLIC".authors ADD CONSTRAINT FK_AUTHORS_AUTHORS_DATA FOREIGN KEY (email) REFERENCES LTHDB."PUBLIC".authors_data (authors_email)
CREATE TABLE LTHDB.PUBLIC.authors_data AS SELECT DISTINCT email AS authors_email FROM LTHDB.PUBLIC.authors WHERE email IS NOT NULL
ALTER TABLE LTHDB.PUBLIC.authors_data ALTER COLUMN authors_email SET NOT NULL
ALTER TABLE LTHDB.PUBLIC.authors_data ADD PRIMARY KEY (authors_email)
ALTER TABLE LTHDB.PUBLIC.authors ADD CONSTRAINT FK_AUTHORS_AUTHORS_DATA FOREIGN KEY (email) REFERENCES LTHDB.PUBLIC.authors_data (authors_email)
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ALTER TABLE LTHDB."PUBLIC".posts ALTER COLUMN inserted_date SET NOT NULL
ALTER TABLE LTHDB.PUBLIC.posts ALTER COLUMN inserted_date SET NOT NULL
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ALTER TABLE LTHDB."PUBLIC".posts ADD CONSTRAINT pk_posts PRIMARY KEY (id)
ALTER TABLE LTHDB.PUBLIC.posts ADD CONSTRAINT pk_posts PRIMARY KEY (id)
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ALTER TABLE LTHDB."PUBLIC".authors ADD CONSTRAINT test_unique_constraint UNIQUE (email)
ALTER TABLE LTHDB.PUBLIC.authors ADD CONSTRAINT test_unique_constraint UNIQUE (email)
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CREATE SEQUENCE "PUBLIC".test_sequence START WITH 1 INCREMENT BY 1
ALTER SEQUENCE "PUBLIC".test_sequence INCREMENT BY 10
CREATE SEQUENCE PUBLIC.test_sequence START WITH 1 INCREMENT BY 1
ALTER SEQUENCE PUBLIC.test_sequence INCREMENT BY 10
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CREATE SEQUENCE "PUBLIC".test_sequence START WITH 1 INCREMENT BY 5
CREATE SEQUENCE PUBLIC.test_sequence START WITH 1 INCREMENT BY 5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CREATE TABLE LTHDB."PUBLIC".test_table (test_id INT NOT NULL, test_column VARCHAR(50) NOT NULL, CONSTRAINT PK_TEST_TABLE PRIMARY KEY (test_id))
CREATE TABLE LTHDB.PUBLIC.test_table (test_id INT NOT NULL, test_column VARCHAR(50) NOT NULL, CONSTRAINT PK_TEST_TABLE PRIMARY KEY (test_id))
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CREATE TABLE LTHDB."PUBLIC".createTableDataTypeDoubleIsFloat (floatCol FLOAT)
CREATE TABLE LTHDB.PUBLIC.createTableDataTypeDoubleIsFloat (floatCol FLOAT)
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CREATE TABLE LTHDB."PUBLIC".createTableDataTypeText (textCol TEXT)
CREATE TABLE LTHDB.PUBLIC.createTableDataTypeText (textCol TEXT)
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CREATE TABLE LTHDB."PUBLIC".lms_create_table_test (lms_test_id INT, lms_test_timestamp timestamp)
CREATE TABLE LTHDB.PUBLIC.lms_create_table_test (lms_test_id INT, lms_test_timestamp timestamp)
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CREATE VIEW LTHDB."PUBLIC".test_view AS select id, first_name, last_name, email from authors
CREATE VIEW LTHDB.PUBLIC.test_view AS select id, first_name, last_name, email from authors
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ALTER TABLE LTHDB."PUBLIC".posts ADD CONSTRAINT fk_posts_authors_test_1 FOREIGN KEY (author_id) REFERENCES LTHDB."PUBLIC".authors (id)
ALTER TABLE LTHDB."PUBLIC".posts ADD CONSTRAINT fk_posts_authors_test_2 FOREIGN KEY (id) REFERENCES LTHDB."PUBLIC".authors (id)
ALTER TABLE LTHDB.PUBLIC.posts ADD CONSTRAINT fk_posts_authors_test_1 FOREIGN KEY (author_id) REFERENCES LTHDB.PUBLIC.authors (id)
ALTER TABLE LTHDB.PUBLIC.posts ADD CONSTRAINT fk_posts_authors_test_2 FOREIGN KEY (id) REFERENCES LTHDB.PUBLIC.authors (id)
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ALTER TABLE LTHDB."PUBLIC".posts ADD varcharColumn VARCHAR(25)
UPDATE LTHDB."PUBLIC".posts SET varcharColumn = 'INITIAL_VALUE'
ALTER TABLE LTHDB."PUBLIC".posts DROP COLUMN varcharColumn
ALTER TABLE LTHDB.PUBLIC.posts ADD varcharColumn VARCHAR(25)
UPDATE LTHDB.PUBLIC.posts SET varcharColumn = 'INITIAL_VALUE'
ALTER TABLE LTHDB.PUBLIC.posts DROP COLUMN varcharColumn
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CREATE TABLE LTHDB."PUBLIC".dropDefaultTest (id INT, stringColumn STRING DEFAULT 'testDefault')
ALTER TABLE LTHDB."PUBLIC".dropDefaultTest ALTER COLUMN stringColumn DROP DEFAULT
CREATE TABLE LTHDB.PUBLIC.dropDefaultTest (id INT, stringColumn STRING DEFAULT 'testDefault')
ALTER TABLE LTHDB.PUBLIC.dropDefaultTest ALTER COLUMN stringColumn DROP DEFAULT
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ALTER TABLE LTHDB."PUBLIC".posts ADD CONSTRAINT fk_posts_authors_test FOREIGN KEY (author_id) REFERENCES LTHDB."PUBLIC".authors (id)
ALTER TABLE LTHDB."PUBLIC".posts DROP CONSTRAINT fk_posts_authors_test
ALTER TABLE LTHDB.PUBLIC.posts ADD CONSTRAINT fk_posts_authors_test FOREIGN KEY (author_id) REFERENCES LTHDB.PUBLIC.authors (id)
ALTER TABLE LTHDB.PUBLIC.posts DROP CONSTRAINT fk_posts_authors_test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE OR REPLACE FUNCTION test_function()
returns float
as '3.141592654::FLOAT'
DROP FUNCTION "PUBLIC".test_function()
DROP FUNCTION PUBLIC.test_function()
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ALTER TABLE LTHDB."PUBLIC".posts ALTER COLUMN inserted_date SET NOT NULL
ALTER TABLE LTHDB."PUBLIC".posts ALTER COLUMN inserted_date DROP NOT NULL
ALTER TABLE LTHDB.PUBLIC.posts ALTER COLUMN inserted_date SET NOT NULL
ALTER TABLE LTHDB.PUBLIC.posts ALTER COLUMN inserted_date DROP NOT NULL
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ALTER TABLE LTHDB."PUBLIC".posts ADD CONSTRAINT pk_posts PRIMARY KEY (id)
ALTER TABLE LTHDB."PUBLIC".posts DROP PRIMARY KEY
ALTER TABLE LTHDB.PUBLIC.posts ADD CONSTRAINT pk_posts PRIMARY KEY (id)
ALTER TABLE LTHDB.PUBLIC.posts DROP PRIMARY KEY
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CREATE SEQUENCE "PUBLIC".test_sequence START WITH 1 INCREMENT BY 1
DROP SEQUENCE "PUBLIC".test_sequence
CREATE SEQUENCE PUBLIC.test_sequence START WITH 1 INCREMENT BY 1
DROP SEQUENCE PUBLIC.test_sequence
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CREATE TABLE LTHDB."PUBLIC".test_table (test_id INT NOT NULL, test_column VARCHAR(50) NOT NULL, CONSTRAINT PK_TEST_TABLE PRIMARY KEY (test_id))
DROP TABLE LTHDB."PUBLIC".test_table
CREATE TABLE LTHDB.PUBLIC.test_table (test_id INT NOT NULL, test_column VARCHAR(50) NOT NULL, CONSTRAINT PK_TEST_TABLE PRIMARY KEY (test_id))
DROP TABLE LTHDB.PUBLIC.test_table
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ALTER TABLE LTHDB."PUBLIC".authors ADD CONSTRAINT test_unique_constraint UNIQUE (email)
ALTER TABLE LTHDB."PUBLIC".authors DROP CONSTRAINT test_unique_constraint
ALTER TABLE LTHDB.PUBLIC.authors ADD CONSTRAINT test_unique_constraint UNIQUE (email)
ALTER TABLE LTHDB.PUBLIC.authors DROP CONSTRAINT test_unique_constraint
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CREATE VIEW LTHDB."PUBLIC".test_view AS select id, first_name, last_name, email from authors
DROP VIEW LTHDB."PUBLIC".test_view
CREATE VIEW LTHDB.PUBLIC.test_view AS select id, first_name, last_name, email from authors
DROP VIEW LTHDB.PUBLIC.test_view
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
CREATE TABLE LTHDB."PUBLIC".full_name_table (first_name VARCHAR(50), last_name VARCHAR(50))
INSERT INTO LTHDB."PUBLIC".full_name_table (first_name) VALUES ('John')
UPDATE LTHDB."PUBLIC".full_name_table SET last_name = 'Doe' WHERE first_name='John'
INSERT INTO LTHDB."PUBLIC".full_name_table (first_name) VALUES ('Jane')
UPDATE LTHDB."PUBLIC".full_name_table SET last_name = 'Doe' WHERE first_name='Jane'
ALTER TABLE LTHDB."PUBLIC".full_name_table ADD full_name VARCHAR(255)
UPDATE LTHDB."PUBLIC".full_name_table SET full_name = first_name || ' ' || last_name
ALTER TABLE LTHDB."PUBLIC".full_name_table DROP COLUMN first_name
ALTER TABLE LTHDB."PUBLIC".full_name_table DROP COLUMN last_name
CREATE TABLE LTHDB.PUBLIC.full_name_table (first_name VARCHAR(50), last_name VARCHAR(50))
INSERT INTO LTHDB.PUBLIC.full_name_table (first_name) VALUES ('John')
UPDATE LTHDB.PUBLIC.full_name_table SET last_name = 'Doe' WHERE first_name='John'
INSERT INTO LTHDB.PUBLIC.full_name_table (first_name) VALUES ('Jane')
UPDATE LTHDB.PUBLIC.full_name_table SET last_name = 'Doe' WHERE first_name='Jane'
ALTER TABLE LTHDB.PUBLIC.full_name_table ADD full_name VARCHAR(255)
UPDATE LTHDB.PUBLIC.full_name_table SET full_name = first_name || ' ' || last_name
ALTER TABLE LTHDB.PUBLIC.full_name_table DROP COLUMN first_name
ALTER TABLE LTHDB.PUBLIC.full_name_table DROP COLUMN last_name
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CREATE TABLE LTHDB."PUBLIC".modify_data_type_test (intColumn NUMBER(10), intColumn2 NUMBER(30))
ALTER TABLE LTHDB."PUBLIC".modify_data_type_test ALTER COLUMN intColumn TYPE NUMBER(20)
CREATE TABLE LTHDB.PUBLIC.modify_data_type_test (intColumn NUMBER(10), intColumn2 NUMBER(30))
ALTER TABLE LTHDB.PUBLIC.modify_data_type_test ALTER COLUMN intColumn TYPE NUMBER(20)
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/* prepend comment */ CREATE TABLE LTHDB."PUBLIC".test_table (test_id INT NOT NULL, test_column VARCHAR(50) NOT NULL) -- append comment
/* prepend comment */ CREATE TABLE LTHDB.PUBLIC.test_table (test_id INT NOT NULL, test_column VARCHAR(50) NOT NULL) -- append comment
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ALTER TABLE LTHDB."PUBLIC".authors RENAME COLUMN first_name TO first_name_renameColumn_test
ALTER TABLE LTHDB.PUBLIC.authors RENAME COLUMN first_name TO first_name_renameColumn_test
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CREATE SEQUENCE "PUBLIC".test_sequence START WITH 1 INCREMENT BY 1
ALTER SEQUENCE "PUBLIC".test_sequence RENAME TO test_sequence_rename_test
CREATE SEQUENCE PUBLIC.test_sequence START WITH 1 INCREMENT BY 1
ALTER SEQUENCE PUBLIC.test_sequence RENAME TO test_sequence_rename_test
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CREATE TABLE LTHDB."PUBLIC".oldnametable (test_id INT NOT NULL, test_column VARCHAR(50) NOT NULL, CONSTRAINT PK_OLDNAMETABLE PRIMARY KEY (test_id))
ALTER TABLE LTHDB."PUBLIC".oldnametable RENAME TO LTHDB."PUBLIC".newnametable
CREATE TABLE LTHDB.PUBLIC.oldnametable (test_id INT NOT NULL, test_column VARCHAR(50) NOT NULL, CONSTRAINT PK_OLDNAMETABLE PRIMARY KEY (test_id))
ALTER TABLE LTHDB.PUBLIC.oldnametable RENAME TO LTHDB.PUBLIC.newnametable
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
CREATE VIEW LTHDB."PUBLIC".test_view AS select id, first_name, last_name, email from authors
ALTER VIEW LTHDB."PUBLIC".test_view RENAME TO LTHDB."PUBLIC".test_view_new
CREATE VIEW LTHDB.PUBLIC.test_view AS select id, first_name, last_name, email from authors
ALTER VIEW LTHDB.PUBLIC.test_view RENAME TO LTHDB.PUBLIC.test_view_new
Original file line number Diff line number Diff line change
@@ -1 +1 @@
COMMENT ON COLUMN LTHDB."PUBLIC".authors.id IS 'A Test Column Remark'
COMMENT ON COLUMN LTHDB.PUBLIC.authors.id IS 'A Test Column Remark'
Original file line number Diff line number Diff line change
@@ -1 +1 @@
COMMENT ON TABLE LTHDB."PUBLIC".authors IS 'A Test Remark'
COMMENT ON TABLE LTHDB.PUBLIC.authors IS 'A Test Remark'
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE LTHDB."PUBLIC".sqltest (id INT)
CREATE TABLE LTHDB.PUBLIC.sqltest (id INT)
insert into sqltest (id) values (1)
insert into sqltest (id) values (2)
insert into sqltest (id) values (3)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CREATE TABLE LTHDB."PUBLIC".sqltest (id INT)
CREATE TABLE LTHDB.PUBLIC.sqltest (id INT)
insert into sqltest (id) values (1)
insert into sqltest (id) values (2)
insert into sqltest (id) values (3)
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CREATE TABLE LTHDB."PUBLIC".valueSequenceNextTable (test_id INT, test_column VARCHAR(50));
CREATE SEQUENCE "PUBLIC".test_sequence START WITH 30 INCREMENT BY 2;
UPDATE LTHDB."PUBLIC".valueSequenceNextTable SET test_id = "PUBLIC".test_sequence.nextval;
CREATE TABLE LTHDB.PUBLIC.valueSequenceNextTable (test_id INT, test_column VARCHAR(50));
CREATE SEQUENCE PUBLIC.test_sequence START WITH 30 INCREMENT BY 2;
UPDATE LTHDB.PUBLIC.valueSequenceNextTable SET test_id = PUBLIC.test_sequence.nextval;
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
INSERT INTO LTHDB."PUBLIC".posts (id, author_id, title, description, content, inserted_date) VALUES ('100', '6', 'value', 'value', 'value', '2006-10-09')
DELETE FROM LTHDB."PUBLIC".posts WHERE id=100
INSERT INTO LTHDB.PUBLIC.posts (id, author_id, title, description, content, inserted_date) VALUES ('100', '6', 'value', 'value', 'value', '2006-10-09')
DELETE FROM LTHDB.PUBLIC.posts WHERE id=100
Original file line number Diff line number Diff line change
@@ -1 +1 @@
INSERT INTO LTHDB."PUBLIC".posts (id, author_id, title, description, content, inserted_date) VALUES ('100', '6', 'value', 'value', 'value', '2006-10-09')
INSERT INTO LTHDB.PUBLIC.posts (id, author_id, title, description, content, inserted_date) VALUES ('100', '6', 'value', 'value', 'value', '2006-10-09')
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
INSERT INTO LTHDB."PUBLIC".posts (id, author_id, title, description, content, inserted_date) VALUES (6, 1, 'Title1', '[email protected]', 'Content1', '2000-01-01')
INSERT INTO LTHDB."PUBLIC".posts (id, author_id, title, description, content, inserted_date) VALUES (7, 2, 'Title2', '[email protected]', 'Content2', '2000-01-01')
INSERT INTO LTHDB."PUBLIC".posts (id, author_id, title, description, content, inserted_date) VALUES (8, 3, 'Title3', '[email protected]', 'Content3', '2000-01-01')
INSERT INTO LTHDB.PUBLIC.posts (id, author_id, title, description, content, inserted_date) VALUES (6, 1, 'Title1', '[email protected]', 'Content1', '2000-01-01')
INSERT INTO LTHDB.PUBLIC.posts (id, author_id, title, description, content, inserted_date) VALUES (7, 2, 'Title2', '[email protected]', 'Content2', '2000-01-01')
INSERT INTO LTHDB.PUBLIC.posts (id, author_id, title, description, content, inserted_date) VALUES (8, 3, 'Title3', '[email protected]', 'Content3', '2000-01-01')

0 comments on commit aad29a6

Please sign in to comment.