-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It is impossible to create a comment to a field. MSSQL #15880
Comments
@t3mnikov спасибо за сообщение об ошибке. Хотели бы попробовать исправить проблему и прислать Pull Request? |
Дмитрий, спасибо за оперативность и спасибо за предложение. На данный момент у меня нет решения. Я сообщу Вам дополнительно, если кто-то раньше меня не сделает этот фикс. |
А какая версия MSSQL? |
@sergeymakinen, привет! Я начал разбирать метод добавления комментария при MSSQL, в строке 259 указан вызов процедуры sp_updateextendedproperty.
К таким выводам я пришел. Возможно я где-то ошибся. |
@t3mnikov, привет! Спасибо за подробный ответ. |
What steps will reproduce the problem?
$ yii migrate
What is the expected result?
$ yii migrate
Yii Migration Tool (based on Yii v2.0.14.1)
Total 1 new migration to be applied:
m180312_073238_review_table.php
Apply the above migration? (yes|no) [no]:y
*** applying m180312_073238_review_table
> create table foo ... done (time: 0.054s)
*** applied m180312_073238_review_table (time: 0.073s)
1 migration was applied.
Migrated up successfully.
What do you get instead?
Apply the above migration? (yes|no) [no]:y
*** applying m180312_073238_review_table
> create table review ...Exception: SQLSTATE[42000]: [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]В процедуре "sp_updateextendedproperty" указан неправильный параметр или значение.
The SQL being executed was: sp_updateextendedproperty @name = N'MS_Description', @value = 'id пользователя', @level1type = N'Table', @level1name = [review], @level2type = N'Column', @level2name = [user_id] (/home/xandr/Projects/vipishinew/vendor/yiisoft/yii2/db/Schema.php:664)
#0 /home/xandr/Projects/vipishinew/vendor/yiisoft/yii2/db/Command.php(1260): yii\db\Schema->convertException(Object(PDOException), 'sp_updateextend...')
#1 /home/xandr/Projects/vipishinew/vendor/yiisoft/yii2/db/Command.php(1072): yii\db\Command->internalExecute('sp_updateextend...')
#2 /home/xandr/Projects/vipishinew/vendor/yiisoft/yii2/db/Migration.php(326): yii\db\Command->execute()
#3 /home/xandr/Projects/vipishinew/console/migrations/m180312_073238_review_table.php(18): yii\db\Migration->createTable('review', Array)
#4 /home/xandr/Projects/vipishinew/vendor/yiisoft/yii2/db/Migration.php(114): m180312_073238_review_table->safeUp()
#5 /home/xandr/Projects/vipishinew/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(725): yii\db\Migration->up()
#6 /home/xandr/Projects/vipishinew/vendor/yiisoft/yii2/console/controllers/BaseMigrateController.php(199): yii\console\controllers\BaseMigrateController->migrateUp('m180312_073238_...')
#7 [internal function]: yii\console\controllers\BaseMigrateController->actionUp(0)
#8 /home/xandr/Projects/vipishinew/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#9 /home/xandr/Projects/vipishinew/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#10 /home/xandr/Projects/vipishinew/vendor/yiisoft/yii2/console/Controller.php(148): yii\base\Controller->runAction('', Array)
#11 /home/xandr/Projects/vipishinew/vendor/yiisoft/yii2/base/Module.php(528): yii\console\Controller->runAction('', Array)
#12 /home/xandr/Projects/vipishinew/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('migrate', Array)
#13 /home/xandr/Projects/vipishinew/vendor/yiisoft/yii2/console/Application.php(147): yii\console\Application->runAction('migrate', Array)
#14 /home/xandr/Projects/vipishinew/vendor/yiisoft/yii2/base/Application.php(386): yii\console\Application->handleRequest(Object(yii\console\Request))
#15 /home/xandr/Projects/vipishinew/yii(31): yii\base\Application->run()
#16 {main}
*** failed to apply m180312_073238_review_table (time: 0.029s)
0 from 1 migrations were applied.
Migration failed. The rest of the migrations are canceled.
Additional info
createTable('review', [ 'id' => $this->primaryKey(), 'user_id' => $this->integer()->comment('id пользователя'), 'content' => $this->text()->comment('содержимое') ]); } /** * {@inheritdoc} */ public function safeDown() { $this->dropTable('review'); } } | Q | A | ---------------- | --- | Yii version | 2.0.14.1 | PHP version | 7.0.25 | Operating system | Ubuntu 16.04The text was updated successfully, but these errors were encountered: