...
This commit is contained in:
parent
1e22d28754
commit
6b926d3afe
126 changed files with 128562 additions and 104297 deletions
|
|
@ -0,0 +1,32 @@
|
|||
```bash
|
||||
php spark make:scaffold Product
|
||||
```
|
||||
Creates Controller, Model, Migration, Seeder
|
||||
|
||||
```php
|
||||
//up:
|
||||
$this->forge->addField((["id"=>
|
||||
["type"=>"INT",
|
||||
"constraint"=>5,
|
||||
"auto increment" => true,
|
||||
"unsigned" => true
|
||||
],
|
||||
"name" => ["type"=>"VARCHAR".
|
||||
"constraint" => 120,
|
||||
"null" => false
|
||||
]
|
||||
]
|
||||
));
|
||||
$this->forge->addPrimaryKey("id);
|
||||
$this->forge->createTable("students");
|
||||
|
||||
//down:
|
||||
$this->forge->dropTable("students");
|
||||
```
|
||||
|
||||
|
||||
```bash
|
||||
php spark migrate:status
|
||||
|
||||
php spark migrate
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue