add: reactions
This commit is contained in:
parent
c46eb3b807
commit
382e3bc7a6
18 changed files with 357 additions and 11 deletions
|
@ -2,3 +2,4 @@ pub const CREATE_TABLE_USERS: &str = include_str!("./sql/create_users.sql");
|
|||
pub const CREATE_TABLE_PAGES: &str = include_str!("./sql/create_pages.sql");
|
||||
pub const CREATE_TABLE_ENTRIES: &str = include_str!("./sql/create_entries.sql");
|
||||
pub const CREATE_TABLE_MEMBERSHIPS: &str = include_str!("./sql/create_memberships.sql");
|
||||
pub const CREATE_TABLE_REACTIONS: &str = include_str!("./sql/create_reactions.sql");
|
||||
|
|
|
@ -4,5 +4,8 @@ CREATE TABLE IF NOT EXISTS entries (
|
|||
content TEXT NOT NULL,
|
||||
owner INTEGER NOT NULL,
|
||||
journal INTEGER NOT NULL,
|
||||
context TEXT NOT NULL
|
||||
context TEXT NOT NULL,
|
||||
-- likes
|
||||
likes INTEGER NOT NULL,
|
||||
dislikes INTEGER NOT NULL
|
||||
)
|
||||
|
|
|
@ -5,5 +5,8 @@ CREATE TABLE IF NOT EXISTS pages (
|
|||
prompt TEXT NOT NULL,
|
||||
owner INTEGER NOT NULL,
|
||||
read_access TEXT NOT NULL,
|
||||
write_access TEXT NOT NULL
|
||||
write_access TEXT NOT NULL,
|
||||
-- likes
|
||||
likes INTEGER NOT NULL,
|
||||
dislikes INTEGER NOT NULL
|
||||
)
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
CREATE TABLE IF NOT EXISTS reactions (
|
||||
id INTEGER NOT NULL PRIMARY KEY,
|
||||
created INTEGER NOT NULL,
|
||||
owner INTEGER NOT NULL,
|
||||
asset INTEGER NOT NULL,
|
||||
asset_type TEXT NOT NULL
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue