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
29be1da2
authored
2 years ago
by
karade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Andmebaasi deklaratsioon.sql
parent
737a31d3
mysql
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
Andmebaasi deklaratsioon.sql
Andmebaasi deklaratsioon.sql
View file @
29be1da2
...
...
@@ -6,12 +6,6 @@ CREATE TABLE `Flights`(
primary
key
(
id
)
);
CREATE
TABLE
`Bookings`
(
`id`
INT
UNSIGNED
NOT
NULL
AUTO_INCREMENT
,
`flightNum`
CHAR
(
255
)
NOT
NULL
,
`bookingNumber`
CHAR
(
255
)
NOT
NULL
,
primary
key
(
id
)
);
CREATE
TABLE
`Users`
(
`id`
INT
NOT
NULL
AUTO_INCREMENT
,
...
...
@@ -25,9 +19,19 @@ CREATE TABLE `Users`(
`seat`
CHAR
(
255
)
NOT
NULL
,
`luggageClass`
INT
NOT
NULL
,
`flight_id`
INT
NOT
NULL
,
primary
key
(
id
)
primary
key
(
id
),
FOREIGN
KEY
(
flight_id
)
REFERENCES
Flights
(
id
)
);
CREATE
TABLE
`Bookings`
(
`id`
INT
UNSIGNED
NOT
NULL
AUTO_INCREMENT
,
`flightNum`
CHAR
(
255
)
NOT
NULL
,
`bookingNumber`
CHAR
(
255
)
NOT
NULL
,
`flight_id`
INT
NOT
NULL
,
`user_id`
INT
NOT
NULL
,
primary
key
(
id
),
FOREIGN
KEY
(
user_id
)
REFERENCES
Users
(
id
),
FOREIGN
KEY
(
flight_id
)
REFERENCES
Flights
(
id
)
);
INSERT
INTO
flights
(
destination
,
time
,
seats
)
...
...
This diff is collapsed.
Click to expand it.
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