File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -78,9 +78,12 @@ $newTable = $toSchema->createTable('new_table');
78
78
79
79
// add columns
80
80
$newTable->addColumn('id', 'integer', ['unsigned' => true]);
81
- $newTable->addColumn('payload', 'string');
81
+ $newTable->addColumn('payload', 'string', ['notnull' => false]);
82
+ // *option 'notnull' in false mode allows you to insert NULL into the column;
83
+ // in this case, the column will be represented in the ClickHouse as Nullable(String)
82
84
$newTable->addColumn('hash', 'string', ['length' => 32, 'fixed' => true]);
83
- // *option 'fixed' sets the fixed length of a string column as specified; if specified, the type of the column is FixedString
85
+ // *option 'fixed' sets the fixed length of a string column as specified;
86
+ // if specified, the type of the column is FixedString
84
87
85
88
//set primary key
86
89
$newTable->setPrimaryKey(['id']);
You can’t perform that action at this time.
0 commit comments