123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- use think\migration\Migrator;
- use think\migration\db\Column;
- class PermissionsAddColumn extends Migrator
- {
-
- public function change()
- {
- if ($this->hasTable('permissions')) {
- $table = $this->table('permissions');
- $table->addColumn('level', 'string', ['default' => '', 'comment' => '层级', 'limit' => '50', 'after' => 'parent_id'])
- ->update();
- }
- }
- }
|