Changeset 40 for trunk/SQL


Ignore:
Timestamp:
May 5, 2019, 11:48:18 PM (6 years ago)
Author:
chronos
Message:
  • Added: New table DanceFigure to represent various dancing figures.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SQL/Update.php

    r37 r40  
    3131ALTER TABLE `Movie`
    3232  MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
     33
     34CREATE TABLE `DanceFigure` (
     35  `Id` int(11) NOT NULL,
     36  `NameCz` varchar(255) NOT NULL,
     37  `NameEn` varchar(255) NOT NULL,
     38  `Dance` int(11) NOT NULL
     39) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
     40
     41ALTER TABLE `DanceFigure`
     42  ADD PRIMARY KEY (`Id`),
     43  ADD UNIQUE KEY `Id` (`Id`),
     44  ADD KEY `Dance` (`Dance`);
     45
     46ALTER TABLE `DanceFigure`
     47  MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT;
     48
     49ALTER TABLE `DanceFigure`
     50  ADD CONSTRAINT `DanceFigure_ibfk_1` FOREIGN KEY (`Dance`) REFERENCES `Dance` (`Id`);
Note: See TracChangeset for help on using the changeset viewer.