-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
16c8f69
commit aa46cde
Showing
4 changed files
with
40 additions
and
22 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
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
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
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,13 +1,25 @@ | ||
-- USE avinya_db; | ||
USE avinya_db; | ||
|
||
-- -- Person | ||
-- CREATE TABLE IF NOT EXISTS person ( | ||
-- asgardeo_id VARCHAR(255) NOT NULL PRIMARY KEY, | ||
-- permanent_address INT NOT NULL, | ||
-- mailing_address INT NOT NULL, | ||
-- phone INT, | ||
-- organization INT, | ||
-- FOREIGN KEY (permanent_address) REFERENCES address(id), | ||
-- FOREIGN KEY (mailing_address) REFERENCES address(id), | ||
-- FOREIGN KEY (organization) REFERENCES organization(id), | ||
-- ); | ||
-- Person | ||
CREATE TABLE IF NOT EXISTS person ( | ||
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, | ||
preferred_name VARCHAR(512) NOT NULL, | ||
full_name VARCHAR(1024) DEFAULT NULL, | ||
date_of_birth DATE DEFAULT NULL, | ||
sex ENUM ("Male", "Female", "Not Specified") DEFAULT "Not Specified", | ||
asgardeo_id VARCHAR(255) DEFAULT NULL, | ||
permanent_address_id INT DEFAULT NULL, | ||
mailing_address_id INT DEFAULT NULL, | ||
phone INT DEFAULT 0, | ||
organization_id INT DEFAULT NULL, | ||
avinya_type_id INT DEFAULT NULL, | ||
notes VARCHAR(1024) DEFAULT NULL, | ||
nic_no VARCHAR(30) DEFAULT NULL, | ||
passport_no VARCHAR(30) DEFAULT NULL, | ||
id_no VARCHAR(30) DEFAULT NULL, | ||
email VARCHAR(254) DEFAULT NULL, | ||
FOREIGN KEY (permanent_address_id) REFERENCES address(id), | ||
FOREIGN KEY (mailing_address_id) REFERENCES address(id), | ||
FOREIGN KEY (organization_id) REFERENCES organization(id), | ||
FOREIGN KEY (avinya_type_id) REFERENCES avinya_type(id) | ||
); |