mirror of
https://github.com/KazooTTT/kazoottt-blog.git
synced 2025-06-16 15:31:21 +08:00
12 lines
378 B
SQL
12 lines
378 B
SQL
-- Create pageviews table
|
|
CREATE TABLE IF NOT EXISTS pageviews (
|
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
slug TEXT NOT NULL,
|
|
views INTEGER NOT NULL DEFAULT 0,
|
|
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
|
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
|
);
|
|
|
|
-- Create unique index on slug
|
|
CREATE UNIQUE INDEX IF NOT EXISTS idx_pageviews_slug ON pageviews(slug);
|