Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
mvahes
/
Lennubroneerimis_tarkvara
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ef4d6829
authored
Mar 05, 2023
by
karade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Andmebaasi deklaratsioon.sql
parent
f06e0dbc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
Andmebaasi deklaratsioon.sql
Andmebaasi deklaratsioon.sql
View file @
ef4d6829
CREATE
TABLE
`Flights`
(
CREATE
TABLE
`Flights`
(
`destination`
CHAR
(
255
)
NOT
NULL
,
`destination`
CHAR
(
255
)
NOT
NULL
,
`time`
BIGINT
NOT
NULL
,
`time`
CHAR
(
255
)
NOT
NULL
,
`seats`
INT
NOT
NULL
,
`seats`
INT
NOT
NULL
,
primary
key
(
destination
)
primary
key
(
destination
)
);
);
CREATE
TABLE
`Bookings`
(
CREATE
TABLE
`Bookings`
(
`id`
BIGINT
UNSIGNED
NOT
NULL
AUTO_INCREMENT
,
`id`
BIGINT
UNSIGNED
NOT
NULL
AUTO_INCREMENT
,
`seat`
INT
NOT
NULL
,
`seat`
INT
NOT
NULL
,
...
@@ -13,8 +14,9 @@ CREATE TABLE `Bookings`(
...
@@ -13,8 +14,9 @@ CREATE TABLE `Bookings`(
2-Oversized
2-Oversized
3-Other'
,
3-Other'
,
`checkedIn`
TINYINT
(
1
)
NOT
NULL
,
`checkedIn`
TINYINT
(
1
)
NOT
NULL
,
primary
key
(
id
)
primary
key
(
id
)
);
);
CREATE
TABLE
`Users`
(
CREATE
TABLE
`Users`
(
`documentNum`
BIGINT
NOT
NULL
,
`documentNum`
BIGINT
NOT
NULL
,
`firstName`
CHAR
(
255
)
NULL
,
`firstName`
CHAR
(
255
)
NULL
,
...
@@ -22,8 +24,9 @@ CREATE TABLE `Users`(
...
@@ -22,8 +24,9 @@ CREATE TABLE `Users`(
`dateOfBirth`
CHAR
(
255
)
NULL
,
`dateOfBirth`
CHAR
(
255
)
NULL
,
`email`
CHAR
(
255
)
NULL
,
`email`
CHAR
(
255
)
NULL
,
`residency`
CHAR
(
255
)
NULL
,
`residency`
CHAR
(
255
)
NULL
,
primary
key
(
documentNum
)
primary
key
(
documentNum
)
);
);
ALTER
TABLE
ALTER
TABLE
`Bookings`
ADD
CONSTRAINT
`bookings_flightnum_foreign`
FOREIGN
KEY
(
`flightNum`
)
REFERENCES
`Flights`
(
`destination`
);
`Bookings`
ADD
CONSTRAINT
`bookings_flightnum_foreign`
FOREIGN
KEY
(
`flightNum`
)
REFERENCES
`Flights`
(
`destination`
);
ALTER
TABLE
ALTER
TABLE
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment