|
22 | 22 | t.date "date_release"
|
23 | 23 | end
|
24 | 24 |
|
| 25 | + create_table "card_pools", id: :string, force: :cascade do |t| |
| 26 | + t.text "name", null: false |
| 27 | + t.text "format_id", null: false |
| 28 | + t.datetime "created_at", null: false |
| 29 | + t.datetime "updated_at", null: false |
| 30 | + end |
| 31 | + |
| 32 | + create_table "card_pools_card_cycles", id: false, force: :cascade do |t| |
| 33 | + t.text "card_cycle_id", null: false |
| 34 | + t.text "card_pool_id", null: false |
| 35 | + t.index ["card_cycle_id", "card_pool_id"], name: "index_card_pools_card_cycles_on_card_cycle_id_and_card_pool_id" |
| 36 | + end |
| 37 | + |
| 38 | + create_table "card_pools_card_sets", id: false, force: :cascade do |t| |
| 39 | + t.text "card_set_id", null: false |
| 40 | + t.text "card_pool_id", null: false |
| 41 | + t.index ["card_set_id", "card_pool_id"], name: "index_card_pools_card_sets_on_card_set_id_and_card_pool_id" |
| 42 | + end |
| 43 | + |
| 44 | + create_table "card_pools_cards", id: false, force: :cascade do |t| |
| 45 | + t.text "card_id", null: false |
| 46 | + t.text "card_pool_id", null: false |
| 47 | + t.index ["card_id", "card_pool_id"], name: "index_card_pools_cards_on_card_id_and_card_pool_id" |
| 48 | + end |
| 49 | + |
25 | 50 | create_table "card_set_types", id: :string, force: :cascade do |t|
|
26 | 51 | t.text "name", null: false
|
27 | 52 | t.text "description"
|
|
97 | 122 | t.string "description"
|
98 | 123 | end
|
99 | 124 |
|
| 125 | + create_table "formats", id: :string, force: :cascade do |t| |
| 126 | + t.text "name", null: false |
| 127 | + t.text "active_snapshot_id", null: false |
| 128 | + t.datetime "created_at", null: false |
| 129 | + t.datetime "updated_at", null: false |
| 130 | + end |
| 131 | + |
100 | 132 | create_table "illustrators", id: :string, force: :cascade do |t|
|
101 | 133 | t.string "name"
|
102 | 134 | t.datetime "created_at", null: false
|
|
124 | 156 | t.datetime "updated_at", null: false
|
125 | 157 | end
|
126 | 158 |
|
127 |
| - create_table "sides", id: :string, force: :cascade do |t| |
| 159 | + create_table "restrictions", id: :string, force: :cascade do |t| |
128 | 160 | t.text "name", null: false
|
| 161 | + t.text "date_start", null: false |
| 162 | + t.integer "point_limit" |
129 | 163 | t.datetime "created_at", null: false
|
130 | 164 | t.datetime "updated_at", null: false
|
131 | 165 | end
|
132 | 166 |
|
133 |
| - create_table "formats", id: :string, force: :cascade do |t| |
134 |
| - t.text "name", null: false |
135 |
| - t.text "active_snapshot_id", null: false |
136 |
| - t.datetime "created_at", precision: 6, null: false |
137 |
| - t.datetime "updated_at", precision: 6, null: false |
138 |
| - end |
139 |
| - |
140 |
| - create_table "snapshots", id: :string, force: :cascade do |t| |
141 |
| - t.text "format_id", null: false |
142 |
| - t.text "card_pool_id", null: false |
143 |
| - t.text "date_start", null: false |
144 |
| - t.text "restriction_id" |
145 |
| - t.boolean "active", null: false |
146 |
| - t.datetime "created_at", precision: 6, null: false |
147 |
| - t.datetime "updated_at", precision: 6, null: false |
148 |
| - end |
149 |
| - |
150 |
| - create_table "card_pools", id: :string, force: :cascade do |t| |
151 |
| - t.text "name", null: false |
152 |
| - t.text "format_id", null: false |
153 |
| - t.datetime "created_at", precision: 6, null: false |
154 |
| - t.datetime "updated_at", precision: 6, null: false |
155 |
| - end |
156 |
| - |
157 |
| - create_table "card_pools_card_cycles", id: false, force: :cascade do |t| |
158 |
| - t.text "card_cycle_id", null: false |
159 |
| - t.text "card_pool_id", null: false |
160 |
| - t.index ["card_cycle_id", "card_pool_id"], name: "index_card_pools_card_cycles_on_card_cycle_id_and_card_pool_id" |
161 |
| - end |
162 |
| - |
163 |
| - create_table "card_pools_card_sets", id: false, force: :cascade do |t| |
164 |
| - t.text "card_set_id", null: false |
165 |
| - t.text "card_pool_id", null: false |
166 |
| - t.index ["card_set_id", "card_pool_id"], name: "index_card_pools_card_sets_on_card_set_id_and_card_pool_id" |
167 |
| - end |
168 |
| - |
169 |
| - create_table "card_pools_cards", id: false, force: :cascade do |t| |
170 |
| - t.text "card_id", null: false |
171 |
| - t.text "card_pool_id", null: false |
172 |
| - t.index ["card_id", "card_pool_id"], name: "index_card_pools_cards_on_card_id_and_card_pool_id" |
173 |
| - end |
| 167 | + create_table "restrictions_card_subtypes_banned", id: false, force: :cascade do |t| |
| 168 | + t.text "restriction_id", null: false |
| 169 | + t.text "card_subtype_id", null: false |
| 170 | + t.datetime "created_at", null: false |
| 171 | + t.datetime "updated_at", null: false |
| 172 | + end |
174 | 173 |
|
175 |
| - create_table "restrictions", id: :string, force: :cascade do |t| |
176 |
| - t.text "name", null: false |
177 |
| - t.text "date_start", null: false |
178 |
| - t.integer "point_limit" |
179 |
| - t.datetime "created_at", precision: 6, null: false |
180 |
| - t.datetime "updated_at", precision: 6, null: false |
181 |
| - end |
| 174 | + create_table "restrictions_cards_banned", id: false, force: :cascade do |t| |
| 175 | + t.text "restriction_id", null: false |
| 176 | + t.text "card_id", null: false |
| 177 | + t.datetime "created_at", null: false |
| 178 | + t.datetime "updated_at", null: false |
| 179 | + end |
182 | 180 |
|
183 |
| - create_table "restrictions_cards_banned", id: false, force: :cascade do |t| |
184 |
| - t.text "restriction_id", null: false |
185 |
| - t.text "card_id", null: false |
186 |
| - t.datetime "created_at", precision: 6, null: false |
187 |
| - t.datetime "updated_at", precision: 6, null: false |
188 |
| - end |
| 181 | + create_table "restrictions_cards_global_penalty", id: false, force: :cascade do |t| |
| 182 | + t.text "restriction_id", null: false |
| 183 | + t.text "card_id", null: false |
| 184 | + t.integer "value", null: false |
| 185 | + t.datetime "created_at", null: false |
| 186 | + t.datetime "updated_at", null: false |
| 187 | + end |
189 | 188 |
|
190 |
| - create_table "restrictions_cards_restricted", id: false, force: :cascade do |t| |
191 |
| - t.text "restriction_id", null: false |
192 |
| - t.text "card_id", null: false |
193 |
| - t.datetime "created_at", precision: 6, null: false |
194 |
| - t.datetime "updated_at", precision: 6, null: false |
195 |
| - end |
| 189 | + create_table "restrictions_cards_points", id: false, force: :cascade do |t| |
| 190 | + t.text "restriction_id", null: false |
| 191 | + t.text "card_id", null: false |
| 192 | + t.integer "value", null: false |
| 193 | + t.datetime "created_at", null: false |
| 194 | + t.datetime "updated_at", null: false |
| 195 | + end |
196 | 196 |
|
197 |
| - create_table "restrictions_cards_universal_faction_cost", id: false, force: :cascade do |t| |
198 |
| - t.text "restriction_id", null: false |
199 |
| - t.text "card_id", null: false |
200 |
| - t.integer "value", null: false |
201 |
| - t.datetime "created_at", precision: 6, null: false |
202 |
| - t.datetime "updated_at", precision: 6, null: false |
203 |
| - end |
| 197 | + create_table "restrictions_cards_restricted", id: false, force: :cascade do |t| |
| 198 | + t.text "restriction_id", null: false |
| 199 | + t.text "card_id", null: false |
| 200 | + t.datetime "created_at", null: false |
| 201 | + t.datetime "updated_at", null: false |
| 202 | + end |
204 | 203 |
|
205 |
| - create_table "restrictions_cards_global_penalty", id: false, force: :cascade do |t| |
206 |
| - t.text "restriction_id", null: false |
207 |
| - t.text "card_id", null: false |
208 |
| - t.integer "value", null: false |
209 |
| - t.datetime "created_at", precision: 6, null: false |
210 |
| - t.datetime "updated_at", precision: 6, null: false |
211 |
| - end |
| 204 | + create_table "restrictions_cards_universal_faction_cost", id: false, force: :cascade do |t| |
| 205 | + t.text "restriction_id", null: false |
| 206 | + t.text "card_id", null: false |
| 207 | + t.integer "value", null: false |
| 208 | + t.datetime "created_at", null: false |
| 209 | + t.datetime "updated_at", null: false |
| 210 | + end |
212 | 211 |
|
213 |
| - create_table "restrictions_cards_points", id: false, force: :cascade do |t| |
214 |
| - t.text "restriction_id", null: false |
215 |
| - t.text "card_id", null: false |
216 |
| - t.integer "value", null: false |
217 |
| - t.datetime "created_at", precision: 6, null: false |
218 |
| - t.datetime "updated_at", precision: 6, null: false |
219 |
| - end |
| 212 | + create_table "sides", id: :string, force: :cascade do |t| |
| 213 | + t.text "name", null: false |
| 214 | + t.datetime "created_at", null: false |
| 215 | + t.datetime "updated_at", null: false |
| 216 | + end |
220 | 217 |
|
221 |
| - create_table "restrictions_card_subtypes_banned", id: false, force: :cascade do |t| |
222 |
| - t.text "restriction_id", null: false |
223 |
| - t.text "card_subtype_id", null: false |
224 |
| - t.datetime "created_at", precision: 6, null: false |
225 |
| - t.datetime "updated_at", precision: 6, null: false |
226 |
| - end |
| 218 | + create_table "snapshots", id: :string, force: :cascade do |t| |
| 219 | + t.text "format_id", null: false |
| 220 | + t.text "card_pool_id", null: false |
| 221 | + t.text "date_start", null: false |
| 222 | + t.text "restriction_id" |
| 223 | + t.boolean "active", null: false |
| 224 | + t.datetime "created_at", null: false |
| 225 | + t.datetime "updated_at", null: false |
| 226 | + end |
227 | 227 |
|
| 228 | + add_foreign_key "card_pools", "formats" |
| 229 | + add_foreign_key "card_pools_card_cycles", "card_cycles" |
| 230 | + add_foreign_key "card_pools_card_cycles", "card_pools" |
| 231 | + add_foreign_key "card_pools_card_sets", "card_pools" |
| 232 | + add_foreign_key "card_pools_card_sets", "card_sets" |
| 233 | + add_foreign_key "card_pools_cards", "card_pools" |
| 234 | + add_foreign_key "card_pools_cards", "cards" |
228 | 235 | add_foreign_key "card_sets", "card_cycles"
|
229 | 236 | add_foreign_key "card_sets", "card_set_types"
|
230 | 237 | add_foreign_key "card_types", "sides"
|
|
236 | 243 | add_foreign_key "factions", "sides"
|
237 | 244 | add_foreign_key "printings", "card_sets"
|
238 | 245 | add_foreign_key "printings", "cards"
|
239 |
| - add_foreign_key "snapshots", "formats" |
240 |
| - add_foreign_key "snapshots", "card_pools" |
241 |
| - add_foreign_key "snapshots", "restrictions" |
242 |
| - add_foreign_key "card_pools", "formats" |
243 |
| - add_foreign_key "card_pools_card_cycles", "card_cycles" |
244 |
| - add_foreign_key "card_pools_card_cycles", "card_pools" |
245 |
| - add_foreign_key "card_pools_card_sets", "card_sets" |
246 |
| - add_foreign_key "card_pools_card_sets", "card_pools" |
247 |
| - add_foreign_key "card_pools_cards", "cards" |
248 |
| - add_foreign_key "card_pools_cards", "card_pools" |
| 246 | + add_foreign_key "restrictions_card_subtypes_banned", "card_subtypes" |
| 247 | + add_foreign_key "restrictions_card_subtypes_banned", "restrictions" |
249 | 248 | add_foreign_key "restrictions_cards_banned", "cards"
|
250 | 249 | add_foreign_key "restrictions_cards_banned", "restrictions"
|
251 |
| - add_foreign_key "restrictions_cards_restricted", "cards" |
252 |
| - add_foreign_key "restrictions_cards_restricted", "restrictions" |
253 |
| - add_foreign_key "restrictions_cards_universal_faction_cost", "cards" |
254 |
| - add_foreign_key "restrictions_cards_universal_faction_cost", "restrictions" |
255 | 250 | add_foreign_key "restrictions_cards_global_penalty", "cards"
|
256 | 251 | add_foreign_key "restrictions_cards_global_penalty", "restrictions"
|
257 | 252 | add_foreign_key "restrictions_cards_points", "cards"
|
258 | 253 | add_foreign_key "restrictions_cards_points", "restrictions"
|
259 |
| - add_foreign_key "restrictions_card_subtypes_banned", "restrictions" |
260 |
| - add_foreign_key "restrictions_card_subtypes_banned", "card_subtypes" |
| 254 | + add_foreign_key "restrictions_cards_restricted", "cards" |
| 255 | + add_foreign_key "restrictions_cards_restricted", "restrictions" |
| 256 | + add_foreign_key "restrictions_cards_universal_faction_cost", "cards" |
| 257 | + add_foreign_key "restrictions_cards_universal_faction_cost", "restrictions" |
| 258 | + add_foreign_key "snapshots", "card_pools" |
| 259 | + add_foreign_key "snapshots", "formats" |
| 260 | + add_foreign_key "snapshots", "restrictions" |
261 | 261 | end
|
0 commit comments