mirror of
https://github.com/syumai/workers.git
synced 2025-03-10 17:29:11 +00:00
14 lines
501 B
SQL
14 lines
501 B
SQL
DROP TABLE IF EXISTS articles;
|
|
CREATE TABLE IF NOT EXISTS articles (
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
title TEXT NOT NULL,
|
|
body TEXT NOT NULL,
|
|
created_at INTEGER NOT NULL
|
|
);
|
|
CREATE INDEX idx_articles_on_created_at ON articles (created_at DESC);
|
|
INSERT INTO articles (title, body, created_at) VALUES (
|
|
'title of example post',
|
|
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
unixepoch()
|
|
);
|