1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { sqlite } from "https://esm.town/v/std/sqlite?v=4";
export async function createStudentsTable() {
await sqlite.execute(
`
CREATE TABLE IF NOT EXISTS students (
id INTEGER PRIMARY KEY,
name TEXT NOT NULL,
email TEXT NOT NULL UNIQUE,
verified BOOLEAN DEFAULT 0,
verification_token TEXT UNIQUE,
subscribed_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
current_lesson INTEGER DEFAULT 0,
has_completed_current_lesson BOOLEAN DEFAULT 0
);
`,
);
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
January 20, 2024