test_schema.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. declare(strict_types=1);
  3. return [
  4. [
  5. 'table' => 'schema_generator_comment',
  6. 'columns' => [
  7. 'id' => ['type' => 'integer'],
  8. 'title' => ['type' => 'string', 'null' => true],
  9. ],
  10. 'constraints' => [
  11. 'primary' => ['type' => 'primary', 'columns' => ['id']],
  12. ],
  13. ],
  14. [
  15. 'table' => 'schema_generator',
  16. 'columns' => [
  17. 'id' => ['type' => 'integer'],
  18. 'relation_id' => ['type' => 'integer'],
  19. 'title' => ['type' => 'string', 'null' => true],
  20. 'body' => 'text',
  21. ],
  22. 'constraints' => [
  23. 'primary' => ['type' => 'primary', 'columns' => ['id']],
  24. 'relation_fk' => [
  25. 'type' => 'foreign',
  26. 'columns' => ['relation_id'],
  27. 'references' => ['schema_generator_comment', 'id'],
  28. ],
  29. ],
  30. 'indexes' => [
  31. 'title_idx' => [
  32. 'type' => 'index',
  33. 'columns' => ['title'],
  34. ],
  35. ],
  36. ],
  37. ];