mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-14 06:11:35 +08:00
Fixed yii\db\ActiveRecord
does not updates attribute specified at optimisticLock()
after save
This commit is contained in:
@ -19,6 +19,7 @@ DROP TABLE IF EXISTS "constraints" CASCADE;
|
||||
DROP TABLE IF EXISTS "bool_values" CASCADE;
|
||||
DROP TABLE IF EXISTS "animal" CASCADE;
|
||||
DROP TABLE IF EXISTS "default_pk" CASCADE;
|
||||
DROP TABLE IF EXISTS "document" CASCADE;
|
||||
DROP VIEW IF EXISTS "animal_view";
|
||||
DROP SCHEMA IF EXISTS "schema1" CASCADE;
|
||||
DROP SCHEMA IF EXISTS "schema2" CASCADE;
|
||||
@ -136,7 +137,6 @@ CREATE TABLE "bool_values" (
|
||||
default_false boolean not null default false
|
||||
);
|
||||
|
||||
|
||||
CREATE TABLE "animal" (
|
||||
id serial primary key,
|
||||
type varchar(255) not null
|
||||
@ -147,6 +147,13 @@ CREATE TABLE "default_pk" (
|
||||
type varchar(255) not null
|
||||
);
|
||||
|
||||
CREATE TABLE "animal" (
|
||||
id serial primary key,
|
||||
title varchar(255) not null,
|
||||
content text not null,
|
||||
version integer not null default 0
|
||||
);
|
||||
|
||||
CREATE VIEW "animal_view" AS SELECT * FROM "animal";
|
||||
|
||||
INSERT INTO "animal" (type) VALUES ('yiiunit\data\ar\Cat');
|
||||
@ -194,6 +201,8 @@ INSERT INTO "order_item_with_null_fk" (order_id, item_id, quantity, subtotal) VA
|
||||
INSERT INTO "order_item_with_null_fk" (order_id, item_id, quantity, subtotal) VALUES (2, 3, 1, 8.0);
|
||||
INSERT INTO "order_item_with_null_fk" (order_id, item_id, quantity, subtotal) VALUES (3, 2, 1, 40.0);
|
||||
|
||||
INSERT INTO "document" (title, content, version) VALUES ('Yii 2.0 guide', 'This is Yii 2.0 guide', 0);
|
||||
|
||||
/**
|
||||
* (Postgres-)Database Schema for validator tests
|
||||
*/
|
||||
|
Reference in New Issue
Block a user