tweak fixtures to add more columns and add some initial for postgres/mysql

This commit is contained in:
Ryan Leckey 2020-03-17 21:32:57 -07:00
parent 6cea7e2c1b
commit ec97dfb884
3 changed files with 21 additions and 0 deletions

7
tests/fixtures/mysql.sql vendored Normal file
View file

@ -0,0 +1,7 @@
CREATE TABLE accounts (
id INTEGER PRIMARY KEY AUTOINCREMENT,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
name VARCHAR(255) NOT NULL,
is_active BOOLEAN,
score DOUBLE
);

14
tests/fixtures/postgres.sql vendored Normal file
View file

@ -0,0 +1,14 @@
CREATE TABLE accounts (
id BIGSERIAL PRIMARY KEY,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
name TEXT NOT NULL,
is_active BOOLEAN,
score DOUBLE PRECISION
);
-- https://www.postgresql.org/docs/current/rowtypes.html#ROWTYPES-DECLARING
CREATE TYPE inventory_item AS (
name TEXT,
supplier_id INT,
price BIGINT
);