This repository has been archived on 2024-07-25. You can view files and clone it, but cannot push or open issues or pull requests.
enve/examples/diesel/migrations/2019-12-28-212542_create-posts/up.sql

12 lines
No EOL
367 B
SQL

-- Your SQL goes here
CREATE TABLE posts (
id SERIAL PRIMARY KEY,
title VARCHAR NOT NULL,
body TEXT NOT NULL,
published BOOLEAN NOT NULL DEFAULT 'f'
);
INSERT INTO posts (title, body, published)
VALUES ('First post', 'Interesting body', 't'),
('Second post', 'Very interesting post', 't'),
('Draft post', 'This is post will not be shown', 'f');