Skip to content
This repository has been archived by the owner on Mar 10, 2018. It is now read-only.

Commit

Permalink
add ORM fix commands to "usual" populate
Browse files Browse the repository at this point in the history
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
dialex committed Apr 3, 2013
1 parent 2d3130a commit 2cf51ca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 34 deletions.
32 changes: 0 additions & 32 deletions parliament/static/php/base.php

This file was deleted.

7 changes: 6 additions & 1 deletion populate.sql
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]");
Expand Down
3 changes: 2 additions & 1 deletion populate_FixDjangoORM.sql
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` ) ;

0 comments on commit 2cf51ca

Please sign in to comment.