laravel-migration-generator.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. return [
  3. 'run_after_migrations' => env('LMG_RUN_AFTER_MIGRATIONS', false),
  4. 'clear_output_path' => env('LMG_CLEAR_OUTPUT_PATH', false),
  5. //default configs
  6. 'table_naming_scheme' => env('LMG_TABLE_NAMING_SCHEME', '[IndexedTimestamp]_create_[TableName]_table.php'),
  7. 'view_naming_scheme' => env('LMG_VIEW_NAMING_SCHEME', '[IndexedTimestamp]_create_[ViewName]_view.php'),
  8. 'path' => env('LMG_OUTPUT_PATH', 'tests/database/migrations'),
  9. 'skippable_tables' => env('LMG_SKIPPABLE_TABLES', 'migrations'),
  10. 'skip_views' => env('LMG_SKIP_VIEWS', false),
  11. 'skippable_views' => env('LMG_SKIPPABLE_VIEWS', ''),
  12. 'sort_mode' => env('LMG_SORT_MODE', 'foreign_key'),
  13. 'definitions' => [
  14. 'prefer_unsigned_prefix' => env('LMG_PREFER_UNSIGNED_PREFIX', true),
  15. 'use_defined_index_names' => env('LMG_USE_DEFINED_INDEX_NAMES', true),
  16. 'use_defined_foreign_key_index_names' => env('LMG_USE_DEFINED_FOREIGN_KEY_INDEX_NAMES', true),
  17. 'use_defined_unique_key_index_names' => env('LMG_USE_DEFINED_UNIQUE_KEY_INDEX_NAMES', true),
  18. 'use_defined_primary_key_index_names' => env('LMG_USE_DEFINED_PRIMARY_KEY_INDEX_NAMES', true),
  19. 'with_comments' => env('LMG_WITH_COMMENTS', true),
  20. 'use_defined_datatype_on_timestamp' => env('LMG_USE_DEFINED_DATATYPE_ON_TIMESTAMP', false),
  21. ],
  22. //now driver specific configs
  23. //null = use default
  24. 'mysql' => [
  25. 'table_naming_scheme' => env('LMG_MYSQL_TABLE_NAMING_SCHEME', null),
  26. 'view_naming_scheme' => env('LMG_MYSQL_VIEW_NAMING_SCHEME', null),
  27. 'path' => env('LMG_MYSQL_OUTPUT_PATH', null),
  28. 'skippable_tables' => env('LMG_MYSQL_SKIPPABLE_TABLES', null),
  29. 'skippable_views' => env('LMG_MYSQL_SKIPPABLE_VIEWS', null),
  30. ],
  31. 'sqlite' => [
  32. 'table_naming_scheme' => env('LMG_SQLITE_TABLE_NAMING_SCHEME', null),
  33. 'view_naming_scheme' => env('LMG_SQLITE_VIEW_NAMING_SCHEME', null),
  34. 'path' => env('LMG_SQLITE_OUTPUT_PATH', null),
  35. 'skippable_tables' => env('LMG_SQLITE_SKIPPABLE_TABLES', null),
  36. 'skippable_views' => env('LMG_SQLITE_SKIPPABLE_VIEWS', null),
  37. ],
  38. 'pgsql' => [
  39. 'table_naming_scheme' => env('LMG_PGSQL_TABLE_NAMING_SCHEME', null),
  40. 'view_naming_scheme' => env('LMG_PGSQL_VIEW_NAMING_SCHEME', null),
  41. 'path' => env('LMG_PGSQL_OUTPUT_PATH', null),
  42. 'skippable_tables' => env('LMG_PGSQL_SKIPPABLE_TABLES', null),
  43. 'skippable_views' => env('LMG_PGSQL_SKIPPABLE_VIEWS', null)
  44. ],
  45. 'sqlsrv' => [
  46. 'table_naming_scheme' => env('LMG_SQLSRV_TABLE_NAMING_SCHEME', null),
  47. 'view_naming_scheme' => env('LMG_SQLSRV_VIEW_NAMING_SCHEME', null),
  48. 'path' => env('LMG_SQLSRV_OUTPUT_PATH', null),
  49. 'skippable_tables' => env('LMG_SQLSRV_SKIPPABLE_TABLES', null),
  50. 'skippable_views' => env('LMG_SQLSRV_SKIPPABLE_VIEWS', null),
  51. ],
  52. ];