db-migration
db-migration copied to clipboard
SQLite does not support `addCommentOnTable()`
SQLite does not support addCommentOnTable() and addCommentOnColumn() but supports comments in CREATE TABLE query
CREATE TABLE `table_name` -- table comment
(
id INTEGER, -- field comment
);
The follow command throws an Exception in SQLite
./yii migrate:create post --command=table --fields='name:string(50):comment("Student Name")'
Due to column comment is initialized separately
https://github.com/yiisoft/db-migration/blob/44f9ac4a33a69f8ac4154c51e8c9efd636ea4df8/src/MigrationBuilder.php#L199-L209
The same for the follow command
./yii migrate:create post --command=table --table-comment='Posts of blog'
https://github.com/yiisoft/db-migration/blob/940d9885aa17c273d7e3980f9730d220b6830658/resources/views/createTableMigration.php#L42-L53