mirror of
https://github.com/launchbadge/sqlx
synced 2024-11-10 14:34:19 +00:00
tweak fixtures to add more columns and add some initial for postgres/mysql
This commit is contained in:
parent
6cea7e2c1b
commit
ec97dfb884
3 changed files with 21 additions and 0 deletions
7
tests/fixtures/mysql.sql
vendored
Normal file
7
tests/fixtures/mysql.sql
vendored
Normal 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
14
tests/fixtures/postgres.sql
vendored
Normal 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
|
||||
);
|
Binary file not shown.
Loading…
Reference in a new issue