aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/schema/schema.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/schema/schema.rb')
-rw-r--r--activerecord/test/schema/schema.rb44
1 files changed, 40 insertions, 4 deletions
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb
index 10de3d34cb..08a16d5c9e 100644
--- a/activerecord/test/schema/schema.rb
+++ b/activerecord/test/schema/schema.rb
@@ -1,4 +1,3 @@
-# encoding: utf-8
ActiveRecord::Schema.define do
def except(adapter_names_to_exclude)
@@ -228,6 +227,11 @@ ActiveRecord::Schema.define do
t.integer :extendedWarranty, null: false
end
+ create_table :computers_developers, id: false, force: true do |t|
+ t.references :computer
+ t.references :developer
+ end
+
create_table :contracts, force: true do |t|
t.integer :developer_id
t.integer :company_id
@@ -311,7 +315,7 @@ ActiveRecord::Schema.define do
end
create_table :cold_jokes, force: true do |t|
- t.string :name
+ t.string :cold_name
end
create_table :friendships, force: true do |t|
@@ -464,6 +468,10 @@ ActiveRecord::Schema.define do
t.string :name
end
+ create_table :notifications, force: true do |t|
+ t.string :message
+ end
+
create_table :numeric_data, force: true do |t|
t.decimal :bank_balance, precision: 10, scale: 2
t.decimal :big_bank_balance, precision: 15, scale: 2
@@ -474,6 +482,8 @@ ActiveRecord::Schema.define do
# Oracle/SQLServer supports precision up to 38
if current_adapter?(:OracleAdapter, :SQLServerAdapter)
t.decimal :atoms_in_universe, precision: 38, scale: 0
+ elsif current_adapter?(:FbAdapter)
+ t.decimal :atoms_in_universe, precision: 18, scale: 0
else
t.decimal :atoms_in_universe, precision: 55, scale: 0
end
@@ -585,6 +595,16 @@ ActiveRecord::Schema.define do
t.integer :tags_with_nullify_count, default: 0
end
+ create_table :serialized_posts, force: true do |t|
+ t.integer :author_id
+ t.string :title, null: false
+ end
+
+ create_table :images, force: true do |t|
+ t.integer :imageable_identifier
+ t.string :imageable_class
+ end
+
create_table :price_estimates, force: true do |t|
t.string :estimate_of_type
t.integer :estimate_of_id
@@ -606,7 +626,17 @@ ActiveRecord::Schema.define do
t.string :type
end
- create_table :randomly_named_table, force: true do |t|
+ create_table :randomly_named_table1, force: true do |t|
+ t.string :some_attribute
+ t.integer :another_attribute
+ end
+
+ create_table :randomly_named_table2, force: true do |t|
+ t.string :some_attribute
+ t.integer :another_attribute
+ end
+
+ create_table :randomly_named_table3, force: true do |t|
t.string :some_attribute
t.integer :another_attribute
end
@@ -711,7 +741,7 @@ ActiveRecord::Schema.define do
t.string :author_name
t.string :author_email_address
if mysql_56?
- t.datetime :written_on, limit: 6
+ t.datetime :written_on, precision: 6
else
t.datetime :written_on
end
@@ -755,6 +785,7 @@ ActiveRecord::Schema.define do
t.column :type, :string
t.column :looter_id, :integer
t.column :looter_type, :string
+ t.belongs_to :ship
end
create_table :tyres, force: true do |t|
@@ -877,6 +908,11 @@ ActiveRecord::Schema.define do
t.string :overloaded_string_with_limit, limit: 255
t.string :string_with_default, default: 'the original default'
end
+
+ create_table :users, force: true do |t|
+ t.string :token
+ t.string :auth_token
+ end
end
Course.connection.create_table :courses, force: true do |t|