Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
----------------------------------------------------------------------------------------------------
-- 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
You can’t perform that action at this time.