You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an extension for the Laravel migrations. It is useful when you have a big database that results in a lot of migration files. This package will help you to reduce the number of migration files and furthermore it will give you a better structure with which you will have all schema updates for a table in one file.
6
6
7
7
## Installation
8
8
9
-
Laravel Pro Migrations is distributed as a composer package. So you first have to add the package to your `composer.json` file:
9
+
Laravel Super Migrations is distributed as a composer package. So you first have to add the package to your `composer.json` file:
10
10
11
11
```
12
12
"proai/laravel-super-migrations": "~1.0"
@@ -61,7 +61,7 @@ The idea behind this is that one migration file includes all schemas for a whole
61
61
62
62
### Table classes
63
63
64
-
For each tablename that is returned by the `schemas()` method Laravel Pro Migrations searches for a php file in `database/migrations/tables` with the same name (i.e. for the table `users` there must exist a file `users.php`). This file must contain a class that extends `ProAI\SuperMigrations\Table` and that is named after the table (in camel case) with a `Table` suffix. For example the classname must be `UsersTable` for a table `users`.
64
+
For each tablename that is returned by the `schemas()` method Laravel Super Migrations searches for a php file in `database/migrations/tables` with the same name (i.e. for the table `users` there must exist a file `users.php`). This file must contain a class that extends `ProAI\SuperMigrations\Table` and that is named after the table (in camel case) with a `Table` suffix. For example the classname must be `UsersTable` for a table `users`.
65
65
66
66
Furthermore for each of the migration specific names that we declared in the migration file, the table class must declare a method with the same name (i.e. a `create` method for the users table). Here is a sample users table class that fits to the migration class from the previous section:
0 commit comments