Skip to content

Commit

Permalink
fixup! fixup! fixup! Manually set Types
Browse files Browse the repository at this point in the history
  • Loading branch information
jotoeri committed Feb 24, 2021
1 parent 740a08e commit a84a154
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions lib/Migration/Version010200Date20200323141300.php
Expand Up @@ -85,39 +85,39 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op
'autoincrement' => true,
'notnull' => true,
]);
$table->addColumn('hash', 'string', [
$table->addColumn('hash', self::TYPE_STRING, [
'notnull' => true,
'length' => 64,
]);
$table->addColumn('title', 'string', [
$table->addColumn('title', self::TYPE_STRING, [
'notnull' => true,
'length' => 256,
]);
$table->addColumn('description', 'string', [
$table->addColumn('description', self::TYPE_STRING, [
'notnull' => false,
'length' => 8192,
]);
$table->addColumn('owner_id', 'string', [
$table->addColumn('owner_id', self::TYPE_STRING, [
'notnull' => true,
'length' => 64,
]);
$table->addColumn('access_json', 'json', [
$table->addColumn('access_json', self::TYPE_JSON, [
'notnull' => false,
]);
$table->addColumn('created', 'integer', [
$table->addColumn('created', self::TYPE_INTEGER, [
'notnull' => false,
'comment' => 'unix-timestamp',
]);
$table->addColumn('expires', 'integer', [
$table->addColumn('expires', self::TYPE_INTEGER, [
'notnull' => false,
'default' => 0,
'comment' => 'unix-timestamp',
]);
$table->addColumn('is_anonymous', 'boolean', [
$table->addColumn('is_anonymous', self::TYPE_BOOLEAN, [
'notnull' => true,
'default' => 0,
]);
$table->addColumn('submit_once', 'boolean', [
$table->addColumn('submit_once', self::TYPE_BOOLEAN, [
'notnull' => true,
'default' => 0,
]);
Expand All @@ -127,26 +127,26 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op

if (!$schema->hasTable('forms_v2_questions')) {
$table = $schema->createTable('forms_v2_questions');
$table->addColumn('id', 'integer', [
$table->addColumn('id', self::TYPE_INTEGER, [
'autoincrement' => true,
'notnull' => true,
]);
$table->addColumn('form_id', 'integer', [
$table->addColumn('form_id', self::TYPE_INTEGER, [
'notnull' => true,
]);
$table->addColumn('order', 'integer', [
$table->addColumn('order', self::TYPE_INTEGER, [
'notnull' => true,
'default' => 1,
]);
$table->addColumn('type', 'string', [
$table->addColumn('type', self::TYPE_STRING, [
'notnull' => true,
'length' => 256,
]);
$table->addColumn('mandatory', 'boolean', [
$table->addColumn('mandatory', self::TYPE_BOOLEAN, [
'notnull' => true,
'default' => 0,
]);
$table->addColumn('text', 'string', [
$table->addColumn('text', self::TYPE_STRING, [
'notnull' => true,
'length' => 2048,
]);
Expand All @@ -155,14 +155,14 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op

if (!$schema->hasTable('forms_v2_options')) {
$table = $schema->createTable('forms_v2_options');
$table->addColumn('id', 'integer', [
$table->addColumn('id', self::TYPE_INTEGER, [
'autoincrement' => true,
'notnull' => true,
]);
$table->addColumn('question_id', 'integer', [
$table->addColumn('question_id', self::TYPE_INTEGER, [
'notnull' => true,
]);
$table->addColumn('text', 'string', [
$table->addColumn('text', self::TYPE_STRING, [
'notnull' => true,
'length' => 1024,
]);
Expand All @@ -171,18 +171,18 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op

if (!$schema->hasTable('forms_v2_submissions')) {
$table = $schema->createTable('forms_v2_submissions');
$table->addColumn('id', 'integer', [
$table->addColumn('id', self::TYPE_INTEGER, [
'autoincrement' => true,
'notnull' => true,
]);
$table->addColumn('form_id', 'integer', [
$table->addColumn('form_id', self::TYPE_INTEGER, [
'notnull' => true,
]);
$table->addColumn('user_id', 'string', [
$table->addColumn('user_id', self::TYPE_STRING, [
'notnull' => true,
'length' => 64,
]);
$table->addColumn('timestamp', 'integer', [
$table->addColumn('timestamp', self::TYPE_INTEGER, [
'notnull' => false,
'comment' => 'unix-timestamp',
]);
Expand All @@ -191,17 +191,17 @@ public function changeSchema(IOutput $output, \Closure $schemaClosure, array $op

if (!$schema->hasTable('forms_v2_answers')) {
$table = $schema->createTable('forms_v2_answers');
$table->addColumn('id', 'integer', [
$table->addColumn('id', self::TYPE_INTEGER, [
'autoincrement' => true,
'notnull' => true,
]);
$table->addColumn('submission_id', 'integer', [
$table->addColumn('submission_id', self::TYPE_INTEGER, [
'notnull' => true,
]);
$table->addColumn('question_id', 'integer', [
$table->addColumn('question_id', self::TYPE_INTEGER, [
'notnull' => true,
]);
$table->addColumn('text', 'string', [
$table->addColumn('text', self::TYPE_STRING, [
'notnull' => true,
'length' => 4096,
]);
Expand Down

0 comments on commit a84a154

Please sign in to comment.