Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

mvahes / Lennubroneerimis_tarkvara

  • This project
    • Loading...
  • Sign in
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 2 years ago by karade's avatar 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 with 7 additions and 4 deletions
  • Andmebaasi deklaratsioon.sql
Andmebaasi deklaratsioon.sql
View file @ ef4d6829
CREATE TABLE `Flights`(
`destination` CHAR(255) NOT NULL,
`time` BIGINT NOT NULL,
`time` CHAR(255) NOT NULL,
`seats` INT NOT NULL,
primary key (destination)
primary key(destination)
);
CREATE TABLE `Bookings`(
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`seat` INT NOT NULL,
......@@ -13,8 +14,9 @@ CREATE TABLE `Bookings`(
2-Oversized
3-Other',
`checkedIn` TINYINT(1) NOT NULL,
primary key (id)
primary key(id)
);
CREATE TABLE `Users`(
`documentNum` BIGINT NOT NULL,
`firstName` CHAR(255) NULL,
......@@ -22,8 +24,9 @@ CREATE TABLE `Users`(
`dateOfBirth` CHAR(255) NULL,
`email` CHAR(255) NULL,
`residency` CHAR(255) NULL,
primary key (documentNum)
primary key(documentNum)
);
ALTER TABLE
`Bookings` ADD CONSTRAINT `bookings_flightnum_foreign` FOREIGN KEY(`flightNum`) REFERENCES `Flights`(`destination`);
ALTER TABLE
......
This diff is collapsed. Click to expand it.
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment