This repository has been archived by the owner on Mar 10, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add ORM fix commands to "usual" populate
one can now execute a single sql file and perform he fix and populate at the same time; removed php files (we don't need php!!)
- Loading branch information
Showing
3 changed files
with
8 additions
and
34 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
INSERT INTO `parliament_person`(`id_num`, `name`, `email`) VALUES (1111,"alice wonderland","[email protected]"); | ||
-- fix Django's ORM limitations | ||
ALTER TABLE `parliament_tag_tagged_proposals` DROP `id`; | ||
ALTER TABLE `parliament_tag_tagged_proposals` ADD PRIMARY KEY ( `tag_id` , `proposal_id` ) ; | ||
|
||
-- populate with dummy text | ||
INSERT INTO `parliament_person`(`id_num`, `name`, `email`) VALUES (1111,"alice wonderland","[email protected]"); | ||
INSERT INTO `parliament_person` VALUES (2222,"bob builder","[email protected]"); | ||
INSERT INTO `parliament_person` VALUES (3333,"clair de lune boudair","[email protected]"); | ||
INSERT INTO `parliament_person` VALUES (4444,"dionisus draconius","[email protected]"); | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
ALTER TABLE `parliament_tag_tagged_proposals` DROP `id`; | ||
-- fix Django's ORM limitations | ||
ALTER TABLE `parliament_tag_tagged_proposals` DROP `id`; | ||
ALTER TABLE `parliament_tag_tagged_proposals` ADD PRIMARY KEY ( `tag_id` , `proposal_id` ) ; |