Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
krmaet
/
Lennubroneerimis_tarkvara
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Pipelines
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
29be1da2
authored
Mar 18, 2023
by
karade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Andmebaasi deklaratsioon.sql
parent
737a31d3
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`(
...
@@ -6,12 +6,6 @@ CREATE TABLE `Flights`(
primary
key
(
id
)
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`
(
CREATE
TABLE
`Users`
(
`id`
INT
NOT
NULL
AUTO_INCREMENT
,
`id`
INT
NOT
NULL
AUTO_INCREMENT
,
...
@@ -25,9 +19,19 @@ CREATE TABLE `Users`(
...
@@ -25,9 +19,19 @@ CREATE TABLE `Users`(
`seat`
CHAR
(
255
)
NOT
NULL
,
`seat`
CHAR
(
255
)
NOT
NULL
,
`luggageClass`
INT
NOT
NULL
,
`luggageClass`
INT
NOT
NULL
,
`flight_id`
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
)
INSERT
INTO
flights
(
destination
,
time
,
seats
)
...
...
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