Skip to content

Commit dca8767

Browse files
committed
Update schema sql
1 parent e21b5ee commit dca8767

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

ee/tabby-db/schema/schema.sql

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -261,16 +261,15 @@ CREATE TABLE ldap_credential(
261261
created_at TIMESTAMP NOT NULL DEFAULT(DATETIME('now')),
262262
updated_at TIMESTAMP NOT NULL DEFAULT(DATETIME('now'))
263263
);
264-
CREATE TABLE pages(
265-
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
266-
-- The user who created the page
267-
author_id INTEGER NOT NULL,
268-
title TEXT,
269-
content TEXT,
270-
created_at TIMESTAMP NOT NULL DEFAULT(DATETIME('now')),
271-
updated_at TIMESTAMP NOT NULL DEFAULT(DATETIME('now')),
264+
CREATE TABLE IF NOT EXISTS "pages"(
265+
id integer PRIMARY KEY AUTOINCREMENT NOT NULL,
266+
author_id integer NOT NULL,
267+
title text,
268+
content text,
269+
created_at timestamp NOT NULL DEFAULT(DATETIME('now')),
270+
updated_at timestamp NOT NULL DEFAULT(DATETIME('now')),
272271
code_source_id VARCHAR(255),
273-
FOREIGN KEY(author_id) REFERENCES users(id) ON DELETE CASCADE
272+
FOREIGN KEY(author_id) REFERENCES "users"(id) ON DELETE CASCADE
274273
);
275274
CREATE TABLE page_sections(
276275
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,

0 commit comments

Comments
 (0)