Skip to content

Conversation

@ahmedre
Copy link
Contributor

@ahmedre ahmedre commented Nov 23, 2025

No description provided.

@ahmedre ahmedre requested a review from mohamede1945 November 23, 2025 22:51
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)
Copy link
Contributor Author

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'
Copy link
Contributor Author

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?

Copy link
Collaborator

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

Copy link
Collaborator

@mohamede1945 mohamede1945 left a 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 (
Copy link
Collaborator

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?

Copy link
Contributor Author

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'
Copy link
Collaborator

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

@ahmedre ahmedre merged commit fd3fa6f into main Nov 26, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants