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
367 B
MySQL
Raw Normal View History

2019-12-29 01:11:34 +03:00
-- 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');