forked from vilelaricardo/mandacarubroker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: JonasFortes12 <[email protected]>
- Loading branch information
1 parent
3866f5e
commit 60bb9df
Showing
3 changed files
with
14 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,3 @@ | ||
DROP TABLE IF EXISTS stock; | ||
|
||
CREATE TABLE stock ( | ||
id VARCHAR PRIMARY KEY, | ||
symbol VARCHAR NOT NULL, | ||
company_name VARCHAR NOT NULL, | ||
price FLOAT NOT NULL | ||
); | ||
|
||
INSERT INTO stock ("id", "symbol", "company_name", "price") | ||
VALUES | ||
('b2d13c5a-3df0-4673-b3e6-49244f395ac9', 'APPL1', 'Apple Inc.', 100.00), | ||
|
@@ -16,24 +7,11 @@ VALUES | |
('b2d13c5a-3df0-4673-b3e6-49244f395a99', 'META5', 'Facebook Inc.', 500.00) | ||
ON CONFLICT (id) DO NOTHING; | ||
|
||
|
||
DROP TABLE IF EXISTS users; | ||
|
||
CREATE TABLE users ( | ||
id VARCHAR PRIMARY KEY, | ||
email VARCHAR NOT NULL, | ||
username VARCHAR NOT NULL, | ||
password VARCHAR NOT NULL, | ||
first_name VARCHAR NOT NULL, | ||
last_name VARCHAR, | ||
birth_date DATE NOT NULL, | ||
balance DECIMAL | ||
); | ||
|
||
INSERT INTO users (id, email, username, password, first_name, last_name, birth_date, balance) | ||
VALUES | ||
('b2d13c5a-3df0-4673-b3e7-49244f395ac8', '[email protected]', 'JoaoP', 'qwerty123', 'Joao', 'Pereira', '1988-07-05', 150.25), | ||
('b2d13c5a-3df0-4673-b3e6-49245f395ac0', '[email protected]', 'MariaRod', 'pass456', 'Maria', 'Rodrigues', '1992-12-15', 75.60), | ||
('b2d13c5a-3df0-4673-b3e6-49244f394ac2', '[email protected]', 'CarlosA', 'pass789', 'Carlos', 'Almeida', '1980-05-02', 500.00), | ||
('b2d13c5a-7df0-4673-b3e6-49244f395ac1', '[email protected]', 'AnaSilva', 'xyz789', 'Ana', 'Silva', '1995-03-21', 300.50), | ||
('b2d13c5a-9df0-4673-b3e6-49244f395ac6', '[email protected]', 'PatriciaS', 'pass123', 'Patricia', 'Santos', '1998-08-30', 250.75); | ||
('b2d13c5a-9df0-4673-b3e6-49244f395ac6', '[email protected]', 'PatriciaS', 'pass123', 'Patricia', 'Santos', '1998-08-30', 250.75) | ||
ON CONFLICT (id) DO NOTHING; |
10 changes: 10 additions & 0 deletions
10
src/main/resources/db/migration/V2__create-table-users.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
CREATE TABLE users ( | ||
id VARCHAR PRIMARY KEY, | ||
email VARCHAR NOT NULL, | ||
username VARCHAR NOT NULL, | ||
password VARCHAR NOT NULL, | ||
first_name VARCHAR NOT NULL, | ||
last_name VARCHAR, | ||
birth_date DATE NOT NULL, | ||
balance DECIMAL | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,3 @@ | ||
DROP TABLE IF EXISTS stock; | ||
|
||
CREATE TABLE stock ( | ||
id VARCHAR PRIMARY KEY, | ||
symbol VARCHAR NOT NULL, | ||
company_name VARCHAR NOT NULL, | ||
price FLOAT NOT NULL | ||
); | ||
|
||
INSERT INTO stock ("id", "symbol", "company_name", "price") | ||
VALUES | ||
('b2d13c5a-3df0-4673-b3e6-49244f395ac9', 'APPL1', 'Apple Inc.', 100.00), | ||
|
@@ -16,24 +7,11 @@ VALUES | |
('b2d13c5a-3df0-4673-b3e6-49244f395a99', 'META5', 'Facebook Inc.', 500.00) | ||
ON CONFLICT (id) DO NOTHING; | ||
|
||
|
||
DROP TABLE IF EXISTS users; | ||
|
||
CREATE TABLE users ( | ||
id VARCHAR PRIMARY KEY, | ||
email VARCHAR NOT NULL, | ||
username VARCHAR NOT NULL, | ||
password VARCHAR NOT NULL, | ||
first_name VARCHAR NOT NULL, | ||
last_name VARCHAR, | ||
birth_date DATE NOT NULL, | ||
balance DECIMAL | ||
); | ||
|
||
INSERT INTO users (id, email, username, password, first_name, last_name, birth_date, balance) | ||
VALUES | ||
('b2d13c5a-3df0-4673-b3e7-49244f395ac8', '[email protected]', 'JoaoP', 'qwerty123', 'Joao', 'Pereira', '1988-07-05', 150.25), | ||
('b2d13c5a-3df0-4673-b3e6-49245f395ac0', '[email protected]', 'MariaRod', 'pass456', 'Maria', 'Rodrigues', '1992-12-15', 75.60), | ||
('b2d13c5a-3df0-4673-b3e6-49244f394ac2', '[email protected]', 'CarlosA', 'pass789', 'Carlos', 'Almeida', '1980-05-02', 500.00), | ||
('b2d13c5a-7df0-4673-b3e6-49244f395ac1', '[email protected]', 'AnaSilva', 'xyz789', 'Ana', 'Silva', '1995-03-21', 300.50), | ||
('b2d13c5a-9df0-4673-b3e6-49244f395ac6', '[email protected]', 'PatriciaS', 'pass123', 'Patricia', 'Santos', '1998-08-30', 250.75); | ||
('b2d13c5a-9df0-4673-b3e6-49244f395ac6', '[email protected]', 'PatriciaS', 'pass123', 'Patricia', 'Santos', '1998-08-30', 250.75) | ||
ON CONFLICT (id) DO NOTHING; |