yiisoft / yiisoft/db-migration
SQLite does not support `addCommentOnTable()`
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 32
- Forks
- 18
- Avg merge
- 22h 18m
- Merged PRs (30d)
- 2
Description
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
The same for the follow command
./yii migrate:create post --command=table --table-comment='Posts of blog'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked sections of src/MigrationBuilder.php and resources/views/createTableMigration.php, then run the two provided yii migrate:create commands against SQLite. Check how table and column comments are generated and verify that the resulting migration uses SQLite-compatible CREATE TABLE comments without throwing an exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, sqlite
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100