Skip to content

Commit

Permalink
update init-db.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
ndy2 committed Nov 6, 2024
1 parent 9b32194 commit cbb7c76
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions resources/database/init-db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ CREATE DATABASE IF NOT EXISTS realworld;
USE realworld;

CREATE TABLE IF NOT EXISTS users (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL,
created_at TIMESTAMP NOT NULL,
updated_at TIMESTAMP NOT NULL
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL,
created_at TIMESTAMP NOT NULL,
updated_at TIMESTAMP NOT NULL
);

CREATE TABLE IF NOT EXISTS profiles (
Expand All @@ -19,3 +19,11 @@ CREATE TABLE IF NOT EXISTS profiles (
created_at TIMESTAMP NOT NULL,
updated_at TIMESTAMP NOT NULL
);

CREATE TABLE IF NOT EXISTS followers (
id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT NOT NULL,
follower_id INT NOT NULL,
created_at TIMESTAMP NOT NULL,
updated_at TIMESTAMP NOT NULL
);

0 comments on commit cbb7c76

Please sign in to comment.