hasTable('moneyplanner_accounts')) { $table = $schema->createTable('moneyplanner_accounts'); $table->addColumn('id', 'integer', [ 'autoincrement' => true, 'notnull' => true, ]); $table->addColumn('user_id', 'string', [ 'notnull' => true, 'length' => 64 ]); $table->addColumn('name', 'string', [ 'notnull' => true, 'length' => 255 ]); $table->setPrimaryKey(['id']); $table->addIndex(['user_id'], 'moneyplanner_accounts_user_id_index'); $table->addUniqueIndex(['user_id', 'name'], 'moneyplanner_accounts_user_name_index'); } return $schema; } } ?>