Skip to content

Commit

Permalink
setup ascii art update
Browse files Browse the repository at this point in the history
  • Loading branch information
Dromader2137 committed Apr 3, 2024
1 parent 8e8d99a commit 2faffc3
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions setup.sql
Original file line number Diff line number Diff line change
Expand Up @@ -40,29 +40,30 @@ CREATE TABLE likes(

CREATE TABLE posts_images(
post_id INTEGER NOT NULL,
image_uuid VARCHAR(34) NOT NULL
image_id INTEGER NOT NULL
);

CREATE TABLE images(
image_id INTEGER NOT NULL,
image_uuid VARCHAR(34) NOT NULL
);

-- ---------------- ----------- ---------------- ____________
-- | users | | posts | | posts_tags | | tags |
-- ---------------- ----------- ---------------- ------------
-- | user_id | 1 -| |------- 1 | post_id | 1 - many | post_id | |- 1 | tag_id |
-- | user_name | |--------------------------- ---- many | user_id | | tag_id | many -| | tag_name |
-- | display_name | | | | date | ---------------- ------------
-- | description | | | | body |
-- | passwd | | | -----------
-- | is_admin | | |
-- | is_banned | | |
-- ---------------- | |
-- | ------------- |
-- | | likes | |
-- | ------------- |
-- |- many | user_id | |
-- | post_id | many -|
-- -------------
-- ---------------- ----------- -------------- ____________
-- | users | | posts | | posts_tags | | tags |
-- ---------------- ----------- -------------- ------------
-- | user_id | 1 -| |---- 1 | post_id | 1 -- many | post_id | |- 1 | tag_id |
-- | user_name | |-------------------------+- many | user_id | | | tag_id | many -| | tag_name |
-- | display_name | | | | date | | -------------- ------------
-- | description | | | | body | |
-- | passwd | | | ----------- | ---------------- --------------
-- | is_admin | | | | | posts_images | | images |
-- | is_banned | | | | ---------------- --------------
-- ---------------- | | |- many | post_id | |- 1 | image_id |
-- | ----------- | | image_id | many -| | image_uuid |
-- | | likes | | ---------------- --------------
-- | ----------- |
-- |- many | user_id | |
-- | post_id | many -|
-- -----------

INSERT INTO users VALUES (0, 'root', 'gigachadadmin', 'hala madrid', 'toor', 1, 0);

0 comments on commit 2faffc3

Please sign in to comment.