diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-31 19:38:04 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-31 19:38:04 +0000 |
commit | fbf9281f0e3ced714bc534821c8b241ed7ec358e (patch) | |
tree | 890ca27b4ca235627f0be7b31ec7ce511f7c5968 /activerecord/test/fixtures/db_definitions | |
parent | 60caf0e66172667400777674d09ade1032907076 (diff) | |
download | rails-fbf9281f0e3ced714bc534821c8b241ed7ec358e.tar.gz rails-fbf9281f0e3ced714bc534821c8b241ed7ec358e.tar.bz2 rails-fbf9281f0e3ced714bc534821c8b241ed7ec358e.zip |
Added automated optimistic locking if the field lock_version is present #384 [Michael Koziarski]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@295 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/fixtures/db_definitions')
4 files changed, 24 insertions, 1 deletions
diff --git a/activerecord/test/fixtures/db_definitions/mysql.sql b/activerecord/test/fixtures/db_definitions/mysql.sql index 7bd06e6243..ec27a52445 100755 --- a/activerecord/test/fixtures/db_definitions/mysql.sql +++ b/activerecord/test/fixtures/db_definitions/mysql.sql @@ -110,3 +110,9 @@ CREATE TABLE `mixins` ( `type` varchar(40) default NULL, PRIMARY KEY (`id`) ); + +CREATE TABLE `people` ( + `id` INTEGER NOT NULL PRIMARY KEY, + `first_name` VARCHAR(40) NOT NULL, + `lock_version` INTEGER NOT NULL DEFAULT 0 +);
\ No newline at end of file diff --git a/activerecord/test/fixtures/db_definitions/postgresql.sql b/activerecord/test/fixtures/db_definitions/postgresql.sql index 305852ba7f..6d8222cfd6 100644 --- a/activerecord/test/fixtures/db_definitions/postgresql.sql +++ b/activerecord/test/fixtures/db_definitions/postgresql.sql @@ -127,3 +127,10 @@ CREATE TABLE mixins ( updated_at timestamp, PRIMARY KEY (id) ); + +CREATE TABLE people ( + id serial, + first_name text, + lock_version integer default 0, + PRIMARY KEY (id) +);
\ No newline at end of file diff --git a/activerecord/test/fixtures/db_definitions/sqlite.sql b/activerecord/test/fixtures/db_definitions/sqlite.sql index 9bab9d9a15..5c27832056 100644 --- a/activerecord/test/fixtures/db_definitions/sqlite.sql +++ b/activerecord/test/fixtures/db_definitions/sqlite.sql @@ -99,4 +99,8 @@ CREATE TABLE 'mixins' ( 'updated_at' DATETIME DEFAULT NULL ); - +CREATE TABLE 'people' ( + 'id' INTEGER NOT NULL PRIMARY KEY, + 'first_name' VARCHAR(40) DEFAULT NULL, + 'lock_version' INTEGER NOT NULL DEFAULT 0 +);
\ No newline at end of file diff --git a/activerecord/test/fixtures/db_definitions/sqlserver.sql b/activerecord/test/fixtures/db_definitions/sqlserver.sql index 4152ef59cb..74cd381ba3 100644 --- a/activerecord/test/fixtures/db_definitions/sqlserver.sql +++ b/activerecord/test/fixtures/db_definitions/sqlserver.sql @@ -110,3 +110,9 @@ CREATE TABLE mixins ( ); +CREATE TABLE people ( + id int NOT NULL IDENTITY(1, 1), + first_name varchar(40) NULL, + lock_version int default 0, + PRIMARY KEY (id) +);
\ No newline at end of file |