-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7df4a9f
commit 1c5a23c
Showing
12 changed files
with
113 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
CREATE TABLE "dropbox" ( | ||
"id" int NOT NULL AUTO_INCREMENT, | ||
"desktop_path" varchar(300) NOT NULL, | ||
"created_at" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
"status" enum('pending','done','deleted') DEFAULT 'done', | ||
"filename" varchar(300) NOT NULL, | ||
PRIMARY KEY ("id"), | ||
UNIQUE KEY "desktop_path" ("desktop_path"), | ||
KEY "filename_index" ("filename"), | ||
KEY "status_index" ("status"), | ||
KEY "created_at_desc_idx" ("created_at" DESC) | ||
) | ||
CREATE TYPE status_type AS ENUM ('pending', 'done', 'deleted'); | ||
|
||
CREATE TABLE "dropbox_cursors" ( | ||
"id" int NOT NULL AUTO_INCREMENT, | ||
"dropbox_cursor" varchar(500) NOT NULL, | ||
"created_at" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
PRIMARY KEY ("id"), | ||
UNIQUE KEY "dropbox_cursor" ("dropbox_cursor"), | ||
KEY "idx_created_at_desc" ("created_at" DESC) | ||
) | ||
CREATE TABLE dropbox ( | ||
id INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, | ||
desktop_path VARCHAR(300) NOT NULL UNIQUE, | ||
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, | ||
status status_type DEFAULT 'done', | ||
filename VARCHAR(300) NOT NULL | ||
); | ||
|
||
CREATE INDEX filename_index ON dropbox (filename); | ||
CREATE INDEX status_index ON dropbox (status); | ||
CREATE INDEX created_at_desc_idx ON dropbox (created_at DESC); | ||
|
||
CREATE TABLE dropbox_cursors ( | ||
id INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, | ||
dropbox_cursor VARCHAR(500) NOT NULL UNIQUE, | ||
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP | ||
); | ||
|
||
CREATE INDEX idx_created_at_desc ON dropbox_cursors (created_at DESC); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.