1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <?php
- namespace OC\Core\Migrations;
- use OCP\DB\ISchemaWrapper;
- use OCP\Migration\IOutput;
- use OCP\Migration\SimpleMigrationStep;
- class Version13000Date20170814074715 extends SimpleMigrationStep {
-
- public function preSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
- }
-
- public function changeSchema(IOutput $output, \Closure $schemaClosure, array $options) {
-
- $schema = $schemaClosure();
- if (!$schema->hasTable('accounts')) {
- $table = $schema->createTable('accounts');
- $table->addColumn('uid', 'string', [
- 'notnull' => true,
- 'length' => 64,
- 'default' => '',
- ]);
- $table->addColumn('data', 'text', [
- 'notnull' => true,
- 'default' => '',
- ]);
- $table->setPrimaryKey(['uid']);
- }
- return $schema;
- }
-
- public function postSchemaChange(IOutput $output, \Closure $schemaClosure, array $options) {
- }
- }
|