ajoliat23 / blockBook

0 stars 0 forks source link

Dev SQL server #28

Open jgurary opened 1 year ago

jgurary commented 1 year ago

User posts and post information will be stored on a web2 backend that must run somewhere on the web.

Spin up a SQL server and validate that the tables and queries described in #22 can run as expected.

Connect posting front-end to the server (can bypass protocol initially)

jgurary commented 1 year ago

Post the schema(s) for tables you want in the comments here @Zachtmac1 @E0MCH1NA

E0MCH1NA commented 1 year ago

CREATE TABLE post_information( post_id INT NOT NULL AUTO_INCREMENT, post_author VARCHAR(64) NOT NULL, post_topic VARCHAR(50) NOT NULL, post_contents VARCHAR(280) NOT NULL, post_time_stamp TIMESTAMP NOT NULL, PRIMARY KEY(post_id) );

CREATE TABLE post_likes( post_like_id INT NOT NULL AUTO_INCREMENT, post_id INT NOT NULL, post_author VARCHAR(64) NOT NULL, post_liker VARCHAR(64) NOT NULL, PRIMARY KEY (post_interaction_id), FOREIGN KEY (post_id) REFERENCES post_information(post_id) );

CREATE TABLE post_comments( post_comment_id INT NOT NULL AUTO_INCREMENT, post_id INT NOT NULL, post_author VARCHAR(64) NOT NULL, post_commenter VARCHAR(64) NOT NULL, post_comment VARCHAR(280) NOT NULL, PRIMARY KEY (post_comment_id), FOREIGN KEY (post_id) REFERENCES post_information(post_id) );