-
Notifications
You must be signed in to change notification settings - Fork 1
Add table definitions for tags and recents #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| deleted INTEGER NOT NULL DEFAULT 0, | ||
| CHECK (deleted IN (0, 1)), | ||
| UNIQUE(bookmark_local_id, tag_id), | ||
| FOREIGN KEY(tag_id) REFERENCES tags(local_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
intentionally have no ON DELETE because we need to be able to handle deletes softly
| CREATE TABLE bookmark_tags ( | ||
| local_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, | ||
| bookmark_local_id TEXT NOT NULL, | ||
| bookmark_type TEXT NOT NULL, -- 'PAGE' or 'AYAH' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wdyt of this - make it a number or split this into two tables or?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me the way it's right now
mohamede1945
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good mashaa'Allah.
| @@ -0,0 +1,12 @@ | |||
| CREATE TABLE bookmark_tags ( | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these going to be called tags or collections to match the backend and web?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renaming to collections - جزاكم الله خيراً
| CREATE TABLE bookmark_tags ( | ||
| local_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, | ||
| bookmark_local_id TEXT NOT NULL, | ||
| bookmark_type TEXT NOT NULL, -- 'PAGE' or 'AYAH' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me the way it's right now
persistence/src/commonMain/sqldelight/com/quran/shared/persistence/last_pages.sq
Outdated
Show resolved
Hide resolved
1256d22 to
b9cf9bd
Compare
No description provided.