mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-17 07:51:12 +08:00
Fix #17504: Fix upsert when $updateColumns = true
but there are no columns to update in the table
This commit is contained in:

committed by
Alexander Makarov

parent
f72f7c7406
commit
cdd40b8dfb
@ -22,6 +22,7 @@ IF OBJECT_ID('[T_constraints_3]', 'U') IS NOT NULL DROP TABLE [T_constraints_3];
|
||||
IF OBJECT_ID('[T_constraints_2]', 'U') IS NOT NULL DROP TABLE [T_constraints_2];
|
||||
IF OBJECT_ID('[T_constraints_1]', 'U') IS NOT NULL DROP TABLE [T_constraints_1];
|
||||
IF OBJECT_ID('[T_upsert]', 'U') IS NOT NULL DROP TABLE [T_upsert];
|
||||
IF OBJECT_ID('[T_upsert_1]', 'U') IS NOT NULL DROP TABLE [T_upsert_1];
|
||||
IF OBJECT_ID('[table.with.special.characters]', 'U') IS NOT NULL DROP TABLE [table.with.special.characters];
|
||||
IF OBJECT_ID('[stranger ''table]', 'U') IS NOT NULL DROP TABLE [stranger 'table];
|
||||
|
||||
@ -329,6 +330,12 @@ CREATE TABLE [T_upsert]
|
||||
UNIQUE ([email], [recovery_email])
|
||||
);
|
||||
|
||||
CREATE TABLE [T_upsert_1]
|
||||
(
|
||||
[a] INT NOT NULL,
|
||||
UNIQUE ([a])
|
||||
);
|
||||
|
||||
CREATE TABLE [dbo].[table.with.special.characters] (
|
||||
[id] [int]
|
||||
);
|
||||
|
Reference in New Issue
Block a user