diff options
Diffstat (limited to 'activerecord/test/schema')
-rw-r--r-- | activerecord/test/schema/mysql2_specific_schema.rb | 13 | ||||
-rw-r--r-- | activerecord/test/schema/mysql_specific_schema.rb | 6 | ||||
-rw-r--r-- | activerecord/test/schema/schema.rb | 6 |
3 files changed, 21 insertions, 4 deletions
diff --git a/activerecord/test/schema/mysql2_specific_schema.rb b/activerecord/test/schema/mysql2_specific_schema.rb index 52d3290c84..92e0b197a7 100644 --- a/activerecord/test/schema/mysql2_specific_schema.rb +++ b/activerecord/test/schema/mysql2_specific_schema.rb @@ -2,7 +2,7 @@ ActiveRecord::Schema.define do create_table :binary_fields, force: true do |t| t.binary :var_binary, limit: 255 t.binary :var_binary_large, limit: 4095 - t.column :tiny_blob, 'tinyblob', limit: 255 + t.blob :tiny_blob, limit: 255 t.binary :normal_blob, limit: 65535 t.binary :medium_blob, limit: 16777215 t.binary :long_blob, limit: 2147483647 @@ -40,6 +40,17 @@ BEGIN END SQL + ActiveRecord::Base.connection.execute <<-SQL +DROP PROCEDURE IF EXISTS topics; +SQL + + ActiveRecord::Base.connection.execute <<-SQL +CREATE PROCEDURE topics(IN num INT) SQL SECURITY INVOKER +BEGIN + select * from topics limit num; +END +SQL + ActiveRecord::Base.connection.drop_table "enum_tests", if_exists: true ActiveRecord::Base.connection.execute <<-SQL diff --git a/activerecord/test/schema/mysql_specific_schema.rb b/activerecord/test/schema/mysql_specific_schema.rb index 90f5a60d7b..553cb56103 100644 --- a/activerecord/test/schema/mysql_specific_schema.rb +++ b/activerecord/test/schema/mysql_specific_schema.rb @@ -2,7 +2,7 @@ ActiveRecord::Schema.define do create_table :binary_fields, force: true do |t| t.binary :var_binary, limit: 255 t.binary :var_binary_large, limit: 4095 - t.column :tiny_blob, 'tinyblob', limit: 255 + t.blob :tiny_blob, limit: 255 t.binary :normal_blob, limit: 65535 t.binary :medium_blob, limit: 16777215 t.binary :long_blob, limit: 2147483647 @@ -45,9 +45,9 @@ DROP PROCEDURE IF EXISTS topics; SQL ActiveRecord::Base.connection.execute <<-SQL -CREATE PROCEDURE topics() SQL SECURITY INVOKER +CREATE PROCEDURE topics(IN num INT) SQL SECURITY INVOKER BEGIN - select * from topics limit 1; + select * from topics limit num; END SQL diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb index d334a2740e..690ab1af4b 100644 --- a/activerecord/test/schema/schema.rb +++ b/activerecord/test/schema/schema.rb @@ -253,6 +253,7 @@ ActiveRecord::Schema.define do t.string :first_name t.integer :salary, default: 70000 t.integer :firm_id + t.integer :mentor_id if subsecond_precision_supported? t.datetime :created_at, precision: 6 t.datetime :updated_at, precision: 6 @@ -452,6 +453,10 @@ ActiveRecord::Schema.define do t.string :name end + create_table :mentors, force: true do |t| + t.string :name + end + create_table :minivans, force: true, id: false do |t| t.string :minivan_id t.string :name @@ -660,6 +665,7 @@ ActiveRecord::Schema.define do t.string :name t.string :type t.integer :firm_id + t.integer :mentor_id end create_table :randomly_named_table1, force: true do |t| |