|
| 1 | +<?php |
| 2 | +/** |
| 3 | + * Schema file for CrudJsonApi tests |
| 4 | + * |
| 5 | + * This file defines the database schema for the test fixtures. |
| 6 | + * It is used by the SchemaLoader to create the test database. |
| 7 | + */ |
| 8 | +return [ |
| 9 | + 'countries' => [ |
| 10 | + 'columns' => [ |
| 11 | + 'id' => ['type' => 'integer'], |
| 12 | + 'code' => ['type' => 'string', 'length' => 2, 'null' => false], |
| 13 | + 'name' => ['type' => 'string', 'length' => 255, 'null' => false], |
| 14 | + 'dummy_counter' => ['type' => 'integer'], |
| 15 | + 'currency_id' => ['type' => 'integer', 'null' => true], |
| 16 | + 'national_capital_id' => ['type' => 'integer', 'null' => true], |
| 17 | + 'supercountry_id' => ['type' => 'integer', 'null' => true], |
| 18 | + ], |
| 19 | + 'constraints' => [ |
| 20 | + 'primary' => ['type' => 'primary', 'columns' => ['id']], |
| 21 | + ], |
| 22 | + ], |
| 23 | + 'countries_languages' => [ |
| 24 | + 'columns' => [ |
| 25 | + 'id' => ['type' => 'integer'], |
| 26 | + 'country_id' => ['type' => 'integer', 'length' => 3, 'null' => false], |
| 27 | + 'language_id' => ['type' => 'integer', 'length' => 100, 'null' => false], |
| 28 | + ], |
| 29 | + 'constraints' => [ |
| 30 | + 'primary' => ['type' => 'primary', 'columns' => ['id']], |
| 31 | + ], |
| 32 | + ], |
| 33 | + 'cultures' => [ |
| 34 | + 'columns' => [ |
| 35 | + 'id' => ['type' => 'integer'], |
| 36 | + 'code' => ['type' => 'string', 'length' => 5, 'null' => false], |
| 37 | + 'name' => ['type' => 'string', 'length' => 100, 'null' => false], |
| 38 | + 'another_dummy_counter' => ['type' => 'integer'], |
| 39 | + 'country_id' => ['type' => 'integer', 'null' => false], |
| 40 | + ], |
| 41 | + 'constraints' => [ |
| 42 | + 'primary' => ['type' => 'primary', 'columns' => ['id']], |
| 43 | + ], |
| 44 | + ], |
| 45 | + 'currencies' => [ |
| 46 | + 'columns' => [ |
| 47 | + 'id' => ['type' => 'integer'], |
| 48 | + 'code' => ['type' => 'string', 'length' => 3, 'null' => false], |
| 49 | + 'name' => ['type' => 'string', 'length' => 100, 'null' => false], |
| 50 | + ], |
| 51 | + 'constraints' => [ |
| 52 | + 'primary' => ['type' => 'primary', 'columns' => ['id']], |
| 53 | + ], |
| 54 | + ], |
| 55 | + 'languages' => [ |
| 56 | + 'columns' => [ |
| 57 | + 'id' => ['type' => 'integer'], |
| 58 | + 'code' => ['type' => 'string', 'length' => 2, 'null' => false], |
| 59 | + 'name' => ['type' => 'string', 'length' => 100, 'null' => false], |
| 60 | + ], |
| 61 | + 'constraints' => [ |
| 62 | + 'primary' => ['type' => 'primary', 'columns' => ['id']], |
| 63 | + ], |
| 64 | + ], |
| 65 | + 'national_capitals' => [ |
| 66 | + 'columns' => [ |
| 67 | + 'id' => ['type' => 'integer'], |
| 68 | + 'name' => ['type' => 'string', 'length' => 100, 'null' => false], |
| 69 | + 'description' => ['type' => 'string', 'length' => 255, 'null' => false], |
| 70 | + ], |
| 71 | + 'constraints' => [ |
| 72 | + 'primary' => ['type' => 'primary', 'columns' => ['id']], |
| 73 | + ], |
| 74 | + ], |
| 75 | + 'national_cities' => [ |
| 76 | + 'columns' => [ |
| 77 | + 'id' => ['type' => 'integer'], |
| 78 | + 'name' => ['type' => 'string', 'length' => 100, 'null' => false], |
| 79 | + 'country_id' => ['type' => 'integer', 'null' => false], |
| 80 | + ], |
| 81 | + 'constraints' => [ |
| 82 | + 'primary' => ['type' => 'primary', 'columns' => ['id']], |
| 83 | + ], |
| 84 | + ], |
| 85 | +]; |
0 commit comments