feat: link uuid + increase counter concurrently
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
-- +micrate Up
|
||||
-- SQL in section 'Up' is executed when this migration is applied
|
||||
CREATE TABLE links (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
id TEXT PRIMARY KEY NOT NULL,
|
||||
slug VARCHAR(100) UNIQUE NOT NULL,
|
||||
url TEXT NOT NULL,
|
||||
click_counter INTEGER DEFAULT 0,
|
||||
click_counter INTEGER NOT NULL DEFAULT 0,
|
||||
created_at INTEGER DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
||||
updated_at INTEGER DEFAULT CURRENT_TIMESTAMP NOT NULL
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user