mirror of
https://github.com/launchbadge/sqlx
synced 2024-11-10 06:24:16 +00:00
Update tests/sqlite/setup.sql to match current tests.
This commit is contained in:
parent
333803c1ff
commit
364845e530
1 changed files with 17 additions and 7 deletions
|
@ -1,10 +1,20 @@
|
|||
-- https://github.com/prisma/database-schema-examples/tree/master/postgres/basic-twitter#basic-twitter
|
||||
CREATE TABLE tweet
|
||||
(
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
text TEXT NOT NULL,
|
||||
is_sent BOOLEAN NOT NULL DEFAULT TRUE,
|
||||
CREATE TABLE tweet (
|
||||
id BIGINT NOT NULL PRIMARY KEY,
|
||||
text TEXT NOT NULL,
|
||||
is_sent BOOLEAN NOT NULL DEFAULT TRUE,
|
||||
owner_id BIGINT
|
||||
);
|
||||
|
||||
insert into tweet(id, text, owner_id) values (1, '#sqlx is pretty cool!', 1);
|
||||
INSERT INTO tweet(id, text, owner_id)
|
||||
VALUES (1, '#sqlx is pretty cool!', 1);
|
||||
--
|
||||
CREATE TABLE accounts (
|
||||
id INTEGER NOT NULL PRIMARY KEY,
|
||||
name TEXT NOT NULL,
|
||||
is_active BOOLEAN
|
||||
);
|
||||
INSERT INTO accounts(id, name, is_active)
|
||||
VALUES (1, 'Herp Derpinson', 1);
|
||||
CREATE VIEW accounts_view as
|
||||
SELECT *
|
||||
FROM accounts;
|
||||
|
|
Loading…
Reference in a new issue