Last active
February 5, 2018 11:58
-
-
Save oanalivia/040eb8af3d562bf554495de0f1738525 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------------------------------------------------------------------------------------- | |
-- More details here : http://growingcookies.com/french-towns-departments-and-regions-january-2018/ | |
-- town table : https://gist.github.com/oanalivia/94fc3aaca90c88bbf8871dbf698637bc | |
-- department table : https://gist.github.com/oanalivia/040eb8af3d562bf554495de0f1738525/edit | |
-- region table : https://gist.github.com/oanalivia/0db129e0d66d7371e0f76315326ea82f | |
-- indexes and constraints : https://gist.github.com/oanalivia/040eb8af3d562bf554495de0f1738525 | |
---------------------------------------------------------------------------------------------------- | |
-- | |
-- Indexes for table `department` | |
-- | |
ALTER TABLE `department` | |
ADD PRIMARY KEY (`id`), | |
ADD KEY `IDX_651C94A998260155` (`region_id`); | |
-- | |
-- Indexes for table `region` | |
-- | |
ALTER TABLE `region` | |
ADD PRIMARY KEY (`id`); | |
-- | |
-- Indexes for table `town` | |
-- | |
ALTER TABLE `town` | |
ADD PRIMARY KEY (`id`), | |
ADD KEY `IDX_E750C240AE80F5DF` (`department_id`); | |
-- | |
-- Constraints for dumped tables | |
-- | |
-- | |
-- Constraints for table `department` | |
-- | |
ALTER TABLE `department` | |
ADD CONSTRAINT `FK_651C94A998260155` FOREIGN KEY (`region_id`) REFERENCES `region` (`id`); | |
-- | |
-- Constraints for table `town` | |
-- | |
ALTER TABLE `town` | |
ADD CONSTRAINT `FK_E750C240AE80F5DF` FOREIGN KEY (`department_id`) REFERENCES `department` (`id`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment