1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| DROP TABLE IF EXISTS idea; CREATE TABLE idea ( id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, content TEXT NOT NULL, author TEXT NOT NULL DEFAULT 佚名, description TEXT, origin TEXT, create_time INTEGER NOT NULL, update_time INTEGER NOT NULL, stars INTEGER NOT NULL DEFAULT 0 );
INSERT INTO idea (content, author, description, origin, create_time, update_time) VALUES("hello world.", "vel", "The first commit of all time.", "https://vel.life", DateTime('now'), DateTime('now'));
UPDATE idea SET content = "hello world!", update_time = DateTime('now') WHERE id = 1;
UPDATE idea SET stars = stars + 1 WHERE id = 1;
|