'serial_column' =>
['type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE
],
'test_nullable_field' =>
['type' => 'int', 'not null' => FALSE
],
],
'primary key' =>
['serial_column'
],
];
$this->schema->
createTable($table_name,
$table_spec);
// Insert some rows to the table to test the handling of initial values.
for ($i = 0;
$i < 3;
$i++
) { $this->connection
->
insert($table_name) ->
useDefaults(['serial_column'
]) ->
fields(['test_nullable_field' => 100
]) ->
execute();
} // Add another row with no value for the 'test_nullable_field' column.
$this->connection
->
insert($table_name) ->
useDefaults(['serial_column'
]) ->
execute();
$this->schema->
addField($table_name, 'test_field',
$field_spec);