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
// These statements will be only executed if direction of migrations is down
96
102
$this->downSchema()->dropIfExists();
103
+
104
+
$this->down(function($tableName) {
105
+
// some code
106
+
});
97
107
}
98
108
}
99
109
100
110
```
101
111
102
-
We use `$this->upSchema()` and `$this->downSchema()` to define the up and down schema. These methods return a `ProAI\SuperMigrations\Builder` instance that is similar to the Laravel database schema builder (see [Laravel docs](https://laravel.com/docs/5.3/migrations)). The only difference is that you don't need the tablename as first argument, because the tablename is already known.
112
+
We use `$this->upSchema()` and `$this->downSchema()` to define the up and down schema. These methods return a `ProAI\SuperMigrations\Builder` instance that is similar to the Laravel database schema builder (see [Laravel docs](https://laravel.com/docs/5.3/migrations)). The only difference is that you don't need the tablename as first argument, because the tablename is already known. Furthermore we use `$this->up(...)` and `$this->down(...)` to insert custom code like raw DB statements.
0 commit comments