Changeset 55 for trunk/data
- Timestamp:
- 12/20/05 11:44:03 (3 years ago)
- Files:
-
- trunk/data/fixtures/test_data.yml (modified) (1 diff)
- trunk/data/sql/schema.sql (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/data/fixtures/test_data.yml
r38 r55 11 11 password: symfony 12 12 email: fp@example.com 13 is_administrator: on 13 14 14 15 francois: trunk/data/sql/schema.sql
r44 r55 16 16 `html_body` TEXT , 17 17 `interested_users` INTEGER default 0 , 18 `reports` INTEGER default 0 , 18 19 `created_at` DATETIME , 19 20 `updated_at` DATETIME , … … 38 39 `relevancy_up` INTEGER default 0 , 39 40 `relevancy_down` INTEGER default 0 , 41 `reports` INTEGER default 0 , 40 42 `created_at` DATETIME , 41 43 PRIMARY KEY(`id`), … … 44 46 FOREIGN KEY (`question_id`) 45 47 REFERENCES `ask_question` (`id`) 46 ,48 ON DELETE CASCADE, 47 49 INDEX `ask_answer_FI_2` (`user_id`), 48 50 CONSTRAINT `ask_answer_FK_2` … … 65 67 `salt` VARCHAR(32) , 66 68 `has_paypal` INTEGER default 0 , 69 `want_to_be_moderator` INTEGER default 0 , 70 `is_moderator` INTEGER default 0 , 71 `is_administrator` INTEGER default 0 , 72 `deletions` INTEGER default 0 , 67 73 `created_at` DATETIME , 68 74 PRIMARY KEY(`id`)) … … 81 87 FOREIGN KEY (`question_id`) 82 88 REFERENCES `ask_question` (`id`) 83 ,89 ON DELETE CASCADE, 84 90 INDEX `ask_interest_FI_2` (`user_id`), 85 91 CONSTRAINT `ask_interest_FK_2` … … 102 108 FOREIGN KEY (`answer_id`) 103 109 REFERENCES `ask_answer` (`id`) 104 ,110 ON DELETE CASCADE, 105 111 INDEX `ask_relevancy_FI_2` (`user_id`), 106 112 CONSTRAINT `ask_relevancy_FK_2` … … 115 121 116 122 CREATE TABLE `ask_question_tag`( 117 `question_id` INTEGER ,118 `user_id` INTEGER ,123 `question_id` INTEGER NOT NULL , 124 `user_id` INTEGER NOT NULL , 119 125 `created_at` DATETIME , 120 126 `tag` VARCHAR(100) , 121 `normalized_tag` VARCHAR(100) ,122 UNIQUE KEY `pk`(`question_id`,`user_id`,`normalized_tag`),127 `normalized_tag` VARCHAR(100) NOT NULL , 128 PRIMARY KEY(`question_id`,`user_id`,`normalized_tag`), 123 129 KEY `normalized_tag_index` (`normalized_tag`), 124 130 CONSTRAINT `ask_question_tag_FK_1` 125 131 FOREIGN KEY (`question_id`) 126 132 REFERENCES `ask_question` (`id`) 127 ,133 ON DELETE CASCADE, 128 134 INDEX `ask_question_tag_FI_2` (`user_id`), 129 135 CONSTRAINT `ask_question_tag_FK_2` … … 132 138 ) 133 139 Type=InnoDB; 140 # ----------------------------------------------------------------------- 141 # ask_report_question 142 # ----------------------------------------------------------------------- 143 DROP TABLE IF EXISTS `ask_report_question`; 144 145 CREATE TABLE `ask_report_question`( 146 `question_id` INTEGER NOT NULL , 147 `user_id` INTEGER NOT NULL , 148 `created_at` DATETIME , 149 PRIMARY KEY(`question_id`,`user_id`), 150 CONSTRAINT `ask_report_question_FK_1` 151 FOREIGN KEY (`question_id`) 152 REFERENCES `ask_question` (`id`) 153 ON DELETE CASCADE, 154 INDEX `ask_report_question_FI_2` (`user_id`), 155 CONSTRAINT `ask_report_question_FK_2` 156 FOREIGN KEY (`user_id`) 157 REFERENCES `ask_user` (`id`) 158 ) 159 Type=InnoDB; 160 # ----------------------------------------------------------------------- 161 # ask_report_answer 162 # ----------------------------------------------------------------------- 163 DROP TABLE IF EXISTS `ask_report_answer`; 164 165 CREATE TABLE `ask_report_answer`( 166 `answer_id` INTEGER NOT NULL , 167 `user_id` INTEGER NOT NULL , 168 `created_at` DATETIME , 169 PRIMARY KEY(`answer_id`,`user_id`), 170 CONSTRAINT `ask_report_answer_FK_1` 171 FOREIGN KEY (`answer_id`) 172 REFERENCES `ask_answer` (`id`) 173 ON DELETE CASCADE, 174 INDEX `ask_report_answer_FI_2` (`user_id`), 175 CONSTRAINT `ask_report_answer_FK_2` 176 FOREIGN KEY (`user_id`) 177 REFERENCES `ask_user` (`id`) 178 ) 179 Type=InnoDB; 180 181 134 182 135 183
