DROP TABLE IF EXISTS "ValuesTest";
DROP TABLE IF EXISTS "ImageTest";
DROP TABLE IF EXISTS "JsonTest";

CREATE TABLE "ValuesTest"
(
    "ID" SERIAL NOT NULL PRIMARY KEY,
    "col_nvarchar" VARCHAR(160),
    "col_int" INT,
    "col_numeric" NUMERIC(10,2),
    "col_bool" BOOLEAN
);

CREATE TABLE "ImageTest"
(
    "ID" SERIAL NOT NULL PRIMARY KEY,
    "col_image" bytea
);

CREATE TABLE "JsonTest"
(
    "ID" SERIAL NOT NULL PRIMARY KEY,
    "col1" json,
    "col2" jsonb
);

INSERT INTO "ValuesTest" ("col_nvarchar", "col_int", "col_numeric", "col_bool") VALUES ('value 0', 0, 0, true);
INSERT INTO "ValuesTest" ("col_nvarchar", "col_int", "col_numeric", "col_bool") VALUES ('value 1', 1, 1, true);
INSERT INTO "ValuesTest" ("col_nvarchar", "col_int", "col_numeric", "col_bool") VALUES ('value any', 1241, 14.56, false);

INSERT INTO "JsonTest" ("col1", "col2") VALUES ('{"a":1 ,"b": 2}','{"a":1 ,"b": 2}');

INSERT INTO "ImageTest" ("col_image") VALUES (X'[encoded data, 20302 characters]')
