ibm_db 3.0.5-x86-mingw32 → 5.0.5-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGES +4 -0
- data/LICENSE +1 -1
- data/ParameterizedQueries README +6 -6
- data/README +38 -55
- data/ext/Makefile +269 -0
- data/ext/extconf.rb +34 -3
- data/ext/gil_release_version +3 -0
- data/ext/ibm_db-i386-mingw32.def +2 -0
- data/ext/ibm_db.c +100 -108
- data/ext/ibm_db.o +0 -0
- data/ext/ibm_db.so +0 -0
- data/ext/mkmf.log +110 -0
- data/ext/ruby_ibm_db_cli.o +0 -0
- data/ext/unicode_support_version +3 -0
- data/lib/active_record/connection_adapters/ibm_db_adapter.rb +923 -527
- data/lib/active_record/connection_adapters/ibmdb_adapter.rb +4 -1
- data/lib/mswin32/ibm_db.rb +7 -39
- data/lib/mswin32/rb2x/i386/ibm_db.so +0 -0
- data/test/active_record/connection_adapters/fake_adapter.rb +8 -5
- data/test/cases/adapter_test.rb +133 -58
- data/test/cases/adapters/mysql2/active_schema_test.rb +193 -0
- data/test/cases/adapters/mysql2/bind_parameter_test.rb +50 -0
- data/test/cases/adapters/mysql2/boolean_test.rb +100 -0
- data/test/cases/adapters/mysql2/case_sensitivity_test.rb +63 -0
- data/test/cases/adapters/mysql2/charset_collation_test.rb +54 -0
- data/test/cases/adapters/mysql2/connection_test.rb +210 -0
- data/test/cases/adapters/mysql2/datetime_precision_quoting_test.rb +45 -0
- data/test/cases/adapters/mysql2/enum_test.rb +26 -0
- data/test/cases/adapters/mysql2/explain_test.rb +21 -0
- data/test/cases/adapters/mysql2/json_test.rb +195 -0
- data/test/cases/adapters/mysql2/mysql2_adapter_test.rb +83 -0
- data/test/cases/adapters/mysql2/reserved_word_test.rb +152 -0
- data/test/cases/adapters/mysql2/schema_migrations_test.rb +59 -0
- data/test/cases/adapters/mysql2/schema_test.rb +126 -0
- data/test/cases/adapters/mysql2/sp_test.rb +36 -0
- data/test/cases/adapters/mysql2/sql_types_test.rb +14 -0
- data/test/cases/adapters/mysql2/table_options_test.rb +42 -0
- data/test/cases/adapters/mysql2/unsigned_type_test.rb +66 -0
- data/test/cases/adapters/postgresql/active_schema_test.rb +98 -0
- data/test/cases/adapters/postgresql/array_test.rb +339 -0
- data/test/cases/adapters/postgresql/bit_string_test.rb +82 -0
- data/test/cases/adapters/postgresql/bytea_test.rb +134 -0
- data/test/cases/adapters/postgresql/case_insensitive_test.rb +26 -0
- data/test/cases/adapters/postgresql/change_schema_test.rb +38 -0
- data/test/cases/adapters/postgresql/cidr_test.rb +25 -0
- data/test/cases/adapters/postgresql/citext_test.rb +78 -0
- data/test/cases/adapters/postgresql/collation_test.rb +53 -0
- data/test/cases/adapters/postgresql/composite_test.rb +132 -0
- data/test/cases/adapters/postgresql/connection_test.rb +257 -0
- data/test/cases/adapters/postgresql/datatype_test.rb +92 -0
- data/test/cases/adapters/postgresql/domain_test.rb +47 -0
- data/test/cases/adapters/postgresql/enum_test.rb +91 -0
- data/test/cases/adapters/postgresql/explain_test.rb +20 -0
- data/test/cases/adapters/postgresql/extension_migration_test.rb +63 -0
- data/test/cases/adapters/postgresql/full_text_test.rb +44 -0
- data/test/cases/adapters/postgresql/geometric_test.rb +378 -0
- data/test/cases/adapters/postgresql/hstore_test.rb +382 -0
- data/test/cases/adapters/postgresql/infinity_test.rb +69 -0
- data/test/cases/adapters/postgresql/integer_test.rb +25 -0
- data/test/cases/adapters/postgresql/json_test.rb +237 -0
- data/test/cases/adapters/postgresql/ltree_test.rb +53 -0
- data/test/cases/adapters/postgresql/money_test.rb +96 -0
- data/test/cases/adapters/postgresql/network_test.rb +94 -0
- data/test/cases/adapters/postgresql/numbers_test.rb +49 -0
- data/test/cases/adapters/postgresql/postgresql_adapter_test.rb +405 -0
- data/test/cases/adapters/postgresql/prepared_statements_test.rb +22 -0
- data/test/cases/adapters/postgresql/quoting_test.rb +44 -0
- data/test/cases/adapters/postgresql/range_test.rb +343 -0
- data/test/cases/adapters/postgresql/referential_integrity_test.rb +111 -0
- data/test/cases/adapters/postgresql/rename_table_test.rb +34 -0
- data/test/cases/adapters/postgresql/schema_authorization_test.rb +119 -0
- data/test/cases/adapters/postgresql/schema_test.rb +597 -0
- data/test/cases/adapters/postgresql/serial_test.rb +154 -0
- data/test/cases/adapters/postgresql/statement_pool_test.rb +41 -0
- data/test/cases/adapters/postgresql/timestamp_test.rb +90 -0
- data/test/cases/adapters/postgresql/type_lookup_test.rb +33 -0
- data/test/cases/adapters/postgresql/utils_test.rb +62 -0
- data/test/cases/adapters/postgresql/uuid_test.rb +294 -0
- data/test/cases/adapters/postgresql/xml_test.rb +54 -0
- data/test/cases/adapters/sqlite3/collation_test.rb +53 -0
- data/test/cases/adapters/sqlite3/copy_table_test.rb +98 -0
- data/test/cases/adapters/sqlite3/explain_test.rb +21 -0
- data/test/cases/adapters/sqlite3/quoting_test.rb +101 -0
- data/test/cases/adapters/sqlite3/sqlite3_adapter_test.rb +441 -0
- data/test/cases/adapters/sqlite3/sqlite3_create_folder_test.rb +24 -0
- data/test/cases/adapters/sqlite3/statement_pool_test.rb +20 -0
- data/test/cases/aggregations_test.rb +11 -1
- data/test/cases/ar_schema_test.rb +35 -50
- data/test/cases/associations/association_scope_test.rb +1 -6
- data/test/cases/associations/belongs_to_associations_test.rb +122 -10
- data/test/cases/associations/bidirectional_destroy_dependencies_test.rb +41 -0
- data/test/cases/associations/callbacks_test.rb +5 -7
- data/test/cases/associations/cascaded_eager_loading_test.rb +1 -1
- data/test/cases/associations/eager_load_nested_include_test.rb +1 -3
- data/test/cases/associations/eager_test.rb +158 -73
- data/test/cases/associations/extension_test.rb +7 -2
- data/test/cases/associations/has_and_belongs_to_many_associations_test.rb +64 -32
- data/test/cases/associations/has_many_associations_test.rb +362 -43
- data/test/cases/associations/has_many_through_associations_test.rb +108 -41
- data/test/cases/associations/has_one_associations_test.rb +105 -8
- data/test/cases/associations/has_one_through_associations_test.rb +6 -3
- data/test/cases/associations/inner_join_association_test.rb +3 -3
- data/test/cases/associations/inverse_associations_test.rb +38 -11
- data/test/cases/associations/join_model_test.rb +59 -36
- data/test/cases/associations/left_outer_join_association_test.rb +88 -0
- data/test/cases/associations/nested_through_associations_test.rb +2 -2
- data/test/cases/associations/required_test.rb +25 -5
- data/test/cases/associations_test.rb +39 -34
- data/test/cases/attribute_decorators_test.rb +9 -8
- data/test/cases/attribute_methods/read_test.rb +5 -5
- data/test/cases/attribute_methods_test.rb +97 -40
- data/test/cases/attribute_set_test.rb +64 -4
- data/test/cases/attribute_test.rb +84 -18
- data/test/cases/attributes_test.rb +151 -34
- data/test/cases/autosave_association_test.rb +149 -36
- data/test/cases/base_test.rb +290 -241
- data/test/cases/batches_test.rb +299 -22
- data/test/cases/binary_test.rb +2 -10
- data/test/cases/bind_parameter_test.rb +76 -66
- data/test/cases/cache_key_test.rb +26 -0
- data/test/cases/calculations_test.rb +167 -15
- data/test/cases/callbacks_test.rb +161 -68
- data/test/cases/coders/json_test.rb +15 -0
- data/test/cases/collection_cache_key_test.rb +115 -0
- data/test/cases/column_definition_test.rb +26 -57
- data/test/cases/comment_test.rb +145 -0
- data/test/cases/connection_adapters/adapter_leasing_test.rb +5 -3
- data/test/cases/connection_adapters/connection_handler_test.rb +128 -21
- data/test/cases/connection_adapters/connection_specification_test.rb +1 -1
- data/test/cases/connection_adapters/merge_and_resolve_default_url_config_test.rb +0 -38
- data/test/cases/connection_adapters/mysql_type_lookup_test.rb +5 -1
- data/test/cases/connection_adapters/schema_cache_test.rb +8 -3
- data/test/cases/connection_adapters/type_lookup_test.rb +15 -7
- data/test/cases/connection_management_test.rb +46 -56
- data/test/cases/connection_pool_test.rb +195 -20
- data/test/cases/connection_specification/resolver_test.rb +15 -0
- data/test/cases/counter_cache_test.rb +10 -5
- data/test/cases/custom_locking_test.rb +1 -1
- data/test/cases/database_statements_test.rb +18 -3
- data/test/cases/{invalid_date_test.rb → date_test.rb} +13 -1
- data/test/cases/date_time_precision_test.rb +107 -0
- data/test/cases/defaults_test.rb +85 -89
- data/test/cases/dirty_test.rb +30 -52
- data/test/cases/disconnected_test.rb +4 -2
- data/test/cases/enum_test.rb +178 -24
- data/test/cases/errors_test.rb +16 -0
- data/test/cases/explain_test.rb +32 -21
- data/test/cases/finder_test.rb +273 -148
- data/test/cases/fixture_set/file_test.rb +18 -0
- data/test/cases/fixtures_test.rb +112 -32
- data/test/cases/forbidden_attributes_protection_test.rb +69 -3
- data/test/cases/helper.rb +10 -16
- data/test/cases/hot_compatibility_test.rb +89 -1
- data/test/cases/inheritance_test.rb +284 -53
- data/test/cases/integration_test.rb +23 -7
- data/test/cases/invalid_connection_test.rb +4 -2
- data/test/cases/invertible_migration_test.rb +124 -32
- data/test/cases/json_serialization_test.rb +11 -2
- data/test/cases/locking_test.rb +22 -6
- data/test/cases/log_subscriber_test.rb +106 -17
- data/test/cases/migration/change_schema_test.rb +60 -114
- data/test/cases/migration/change_table_test.rb +34 -2
- data/test/cases/migration/column_attributes_test.rb +7 -23
- data/test/cases/migration/column_positioning_test.rb +8 -8
- data/test/cases/migration/columns_test.rb +17 -11
- data/test/cases/migration/command_recorder_test.rb +47 -2
- data/test/cases/migration/compatibility_test.rb +118 -0
- data/test/cases/migration/create_join_table_test.rb +21 -12
- data/test/cases/migration/foreign_key_test.rb +52 -18
- data/test/cases/migration/index_test.rb +14 -12
- data/test/cases/migration/logger_test.rb +1 -1
- data/test/cases/migration/pending_migrations_test.rb +0 -1
- data/test/cases/migration/references_foreign_key_test.rb +59 -7
- data/test/cases/migration/references_index_test.rb +4 -4
- data/test/cases/migration/references_statements_test.rb +26 -6
- data/test/cases/migration/rename_table_test.rb +25 -25
- data/test/cases/migration_test.rb +279 -81
- data/test/cases/migrator_test.rb +91 -8
- data/test/cases/mixin_test.rb +0 -2
- data/test/cases/modules_test.rb +3 -4
- data/test/cases/multiparameter_attributes_test.rb +24 -2
- data/test/cases/multiple_db_test.rb +11 -4
- data/test/cases/nested_attributes_test.rb +61 -33
- data/test/cases/persistence_test.rb +102 -10
- data/test/cases/pooled_connections_test.rb +3 -3
- data/test/cases/primary_keys_test.rb +170 -31
- data/test/cases/query_cache_test.rb +216 -96
- data/test/cases/quoting_test.rb +65 -19
- data/test/cases/readonly_test.rb +2 -1
- data/test/cases/reflection_test.rb +68 -22
- data/test/cases/relation/delegation_test.rb +3 -8
- data/test/cases/relation/merging_test.rb +10 -14
- data/test/cases/relation/mutation_test.rb +42 -24
- data/test/cases/relation/or_test.rb +92 -0
- data/test/cases/relation/predicate_builder_test.rb +4 -2
- data/test/cases/relation/record_fetch_warning_test.rb +40 -0
- data/test/cases/relation/where_chain_test.rb +23 -99
- data/test/cases/relation/where_clause_test.rb +182 -0
- data/test/cases/relation/where_test.rb +45 -23
- data/test/cases/relation_test.rb +67 -58
- data/test/cases/relations_test.rb +249 -38
- data/test/cases/result_test.rb +10 -0
- data/test/cases/sanitize_test.rb +108 -15
- data/test/cases/schema_dumper_test.rb +119 -125
- data/test/cases/schema_loading_test.rb +52 -0
- data/test/cases/scoping/default_scoping_test.rb +113 -39
- data/test/cases/scoping/named_scoping_test.rb +46 -9
- data/test/cases/scoping/relation_scoping_test.rb +47 -4
- data/test/cases/secure_token_test.rb +32 -0
- data/test/cases/serialization_test.rb +1 -1
- data/test/cases/serialized_attribute_test.rb +93 -6
- data/test/cases/statement_cache_test.rb +38 -0
- data/test/cases/store_test.rb +2 -1
- data/test/cases/suppressor_test.rb +63 -0
- data/test/cases/tasks/database_tasks_test.rb +73 -9
- data/test/cases/tasks/mysql_rake_test.rb +139 -118
- data/test/cases/tasks/postgresql_rake_test.rb +60 -6
- data/test/cases/tasks/sqlite_rake_test.rb +30 -3
- data/test/cases/test_case.rb +28 -20
- data/test/cases/test_fixtures_test.rb +36 -0
- data/test/cases/time_precision_test.rb +103 -0
- data/test/cases/timestamp_test.rb +44 -10
- data/test/cases/touch_later_test.rb +121 -0
- data/test/cases/transaction_callbacks_test.rb +128 -62
- data/test/cases/transaction_isolation_test.rb +2 -2
- data/test/cases/transactions_test.rb +61 -43
- data/test/cases/type/adapter_specific_registry_test.rb +133 -0
- data/test/cases/type/date_time_test.rb +14 -0
- data/test/cases/type/integer_test.rb +2 -96
- data/test/cases/type/string_test.rb +0 -14
- data/test/cases/type_test.rb +39 -0
- data/test/cases/types_test.rb +1 -118
- data/test/cases/unconnected_test.rb +1 -1
- data/test/cases/validations/absence_validation_test.rb +73 -0
- data/test/cases/validations/association_validation_test.rb +13 -2
- data/test/cases/validations/i18n_validation_test.rb +6 -10
- data/test/cases/validations/length_validation_test.rb +62 -30
- data/test/cases/validations/presence_validation_test.rb +36 -1
- data/test/cases/validations/uniqueness_validation_test.rb +128 -37
- data/test/cases/validations_repair_helper.rb +2 -6
- data/test/cases/validations_test.rb +36 -7
- data/test/cases/view_test.rb +102 -5
- data/test/cases/yaml_serialization_test.rb +21 -26
- data/test/config.example.yml +97 -0
- data/test/fixtures/bad_posts.yml +9 -0
- data/test/fixtures/books.yml +20 -0
- data/test/fixtures/content.yml +3 -0
- data/test/fixtures/content_positions.yml +3 -0
- data/test/fixtures/dead_parrots.yml +5 -0
- data/test/fixtures/live_parrots.yml +4 -0
- data/test/fixtures/naked/yml/parrots.yml +2 -0
- data/test/fixtures/naked/yml/trees.yml +3 -0
- data/test/fixtures/nodes.yml +29 -0
- data/test/fixtures/other_comments.yml +6 -0
- data/test/fixtures/other_dogs.yml +2 -0
- data/test/fixtures/other_posts.yml +7 -0
- data/test/fixtures/price_estimates.yml +10 -1
- data/test/fixtures/trees.yml +3 -0
- data/test/migrations/10_urban/9_add_expressions.rb +1 -1
- data/test/migrations/decimal/1_give_me_big_numbers.rb +1 -1
- data/test/migrations/magic/1_currencies_have_symbols.rb +1 -1
- data/test/migrations/missing/1000_people_have_middle_names.rb +2 -2
- data/test/migrations/missing/1_people_have_last_names.rb +2 -2
- data/test/migrations/missing/3_we_need_reminders.rb +2 -2
- data/test/migrations/missing/4_innocent_jointable.rb +2 -2
- data/test/migrations/rename/1_we_need_things.rb +2 -2
- data/test/migrations/rename/2_rename_things.rb +2 -2
- data/test/migrations/to_copy/1_people_have_hobbies.rb +1 -1
- data/test/migrations/to_copy/2_people_have_descriptions.rb +1 -1
- data/test/migrations/to_copy2/1_create_articles.rb +1 -1
- data/test/migrations/to_copy2/2_create_comments.rb +1 -1
- data/test/migrations/to_copy_with_name_collision/1_people_have_hobbies.rb +1 -1
- data/test/migrations/to_copy_with_timestamps/20090101010101_people_have_hobbies.rb +1 -1
- data/test/migrations/to_copy_with_timestamps/20090101010202_people_have_descriptions.rb +1 -1
- data/test/migrations/to_copy_with_timestamps2/20090101010101_create_articles.rb +1 -1
- data/test/migrations/to_copy_with_timestamps2/20090101010202_create_comments.rb +1 -1
- data/test/migrations/valid/1_valid_people_have_last_names.rb +1 -1
- data/test/migrations/valid/2_we_need_reminders.rb +2 -2
- data/test/migrations/valid/3_innocent_jointable.rb +2 -2
- data/test/migrations/valid_with_subdirectories/1_valid_people_have_last_names.rb +1 -1
- data/test/migrations/valid_with_subdirectories/sub/2_we_need_reminders.rb +2 -2
- data/test/migrations/valid_with_subdirectories/sub1/3_innocent_jointable.rb +2 -2
- data/test/migrations/valid_with_timestamps/20100101010101_valid_with_timestamps_people_have_last_names.rb +1 -1
- data/test/migrations/valid_with_timestamps/20100201010101_valid_with_timestamps_we_need_reminders.rb +1 -1
- data/test/migrations/valid_with_timestamps/20100301010101_valid_with_timestamps_innocent_jointable.rb +1 -1
- data/test/migrations/version_check/20131219224947_migration_version_check.rb +1 -1
- data/test/models/admin/randomly_named_c1.rb +6 -2
- data/test/models/aircraft.rb +1 -0
- data/test/models/author.rb +4 -7
- data/test/models/bird.rb +1 -1
- data/test/models/book.rb +5 -0
- data/test/models/bulb.rb +2 -1
- data/test/models/car.rb +3 -0
- data/test/models/cat.rb +10 -0
- data/test/models/chef.rb +1 -0
- data/test/models/club.rb +2 -0
- data/test/models/comment.rb +17 -5
- data/test/models/company.rb +4 -2
- data/test/models/company_in_module.rb +1 -1
- data/test/models/contact.rb +1 -1
- data/test/models/content.rb +40 -0
- data/test/models/customer.rb +8 -2
- data/test/models/developer.rb +19 -0
- data/test/models/face.rb +1 -1
- data/test/models/guitar.rb +4 -0
- data/test/models/hotel.rb +2 -0
- data/test/models/member.rb +1 -0
- data/test/models/member_detail.rb +4 -3
- data/test/models/mentor.rb +3 -0
- data/test/models/mocktail_designer.rb +2 -0
- data/test/models/node.rb +5 -0
- data/test/models/non_primary_key.rb +2 -0
- data/test/models/notification.rb +3 -0
- data/test/models/other_dog.rb +5 -0
- data/test/models/owner.rb +4 -1
- data/test/models/parrot.rb +6 -7
- data/test/models/person.rb +0 -1
- data/test/models/pet.rb +3 -0
- data/test/models/pet_treasure.rb +6 -0
- data/test/models/pirate.rb +3 -3
- data/test/models/post.rb +18 -9
- data/test/models/project.rb +9 -0
- data/test/models/randomly_named_c1.rb +1 -1
- data/test/models/recipe.rb +3 -0
- data/test/models/ship.rb +8 -2
- data/test/models/tag.rb +6 -0
- data/test/models/topic.rb +2 -8
- data/test/models/tree.rb +3 -0
- data/test/models/tuning_peg.rb +4 -0
- data/test/models/user.rb +14 -0
- data/test/models/uuid_item.rb +6 -0
- data/test/schema/mysql2_specific_schema.rb +33 -23
- data/test/schema/oracle_specific_schema.rb +1 -4
- data/test/schema/postgresql_specific_schema.rb +36 -124
- data/test/schema/schema.rb +170 -65
- data/test/schema/schema.rb.original +1057 -0
- data/test/schema/sqlite_specific_schema.rb +1 -5
- data/test/support/connection.rb +1 -0
- data/test/support/schema_dumping_helper.rb +1 -1
- data/test/support/yaml_compatibility_fixtures/rails_4_1.yml +22 -0
- data/test/support/yaml_compatibility_fixtures/rails_4_2_0.yml +182 -0
- metadata +146 -30
- data/lib/mswin32/rb19x/ibm_db.so +0 -0
- data/lib/mswin32/rb21x/i386/ibm_db.so +0 -0
- data/lib/mswin32/rb22x/i386/ibm_db.so +0 -0
- data/lib/mswin32/rb23x/i386/ibm_db.so +0 -0
- data/test/cases/associations/deprecated_counter_cache_on_has_many_through_test.rb +0 -26
- data/test/cases/attribute_methods/serialization_test.rb +0 -29
- data/test/cases/migration/change_schema_test - Copy.rb +0 -448
- data/test/cases/migration/foreign_key_test - Changed.rb +0 -325
- data/test/cases/migration/table_and_index_test.rb +0 -24
- data/test/cases/relation/where_test2.rb +0 -36
- data/test/cases/type/decimal_test.rb +0 -56
- data/test/cases/type/unsigned_integer_test.rb +0 -18
- data/test/cases/xml_serialization_test.rb +0 -457
- data/test/fixtures/naked/csv/accounts.csv +0 -1
- data/test/schema/mysql_specific_schema.rb +0 -70
@@ -1,5 +1,4 @@
|
|
1
1
|
require "cases/migration/helper"
|
2
|
-
require "minitest/mock"
|
3
2
|
|
4
3
|
module ActiveRecord
|
5
4
|
class Migration
|
@@ -13,7 +12,7 @@ module ActiveRecord
|
|
13
12
|
end
|
14
13
|
|
15
14
|
def with_change_table
|
16
|
-
yield
|
15
|
+
yield ActiveRecord::Base.connection.update_table_definition(:delete_me, @connection)
|
17
16
|
end
|
18
17
|
|
19
18
|
def test_references_column_type_adds_id
|
@@ -100,6 +99,13 @@ module ActiveRecord
|
|
100
99
|
end
|
101
100
|
end
|
102
101
|
|
102
|
+
def test_primary_key_creates_primary_key_column
|
103
|
+
with_change_table do |t|
|
104
|
+
@connection.expect :add_column, nil, [:delete_me, :id, :primary_key, primary_key: true, first: true]
|
105
|
+
t.primary_key :id, first: true
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
103
109
|
def test_integer_creates_integer_column
|
104
110
|
with_change_table do |t|
|
105
111
|
@connection.expect :add_column, nil, [:delete_me, :foo, :integer, {}]
|
@@ -108,6 +114,14 @@ module ActiveRecord
|
|
108
114
|
end
|
109
115
|
end
|
110
116
|
|
117
|
+
def test_bigint_creates_bigint_column
|
118
|
+
with_change_table do |t|
|
119
|
+
@connection.expect :add_column, nil, [:delete_me, :foo, :bigint, {}]
|
120
|
+
@connection.expect :add_column, nil, [:delete_me, :bar, :bigint, {}]
|
121
|
+
t.bigint :foo, :bar
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
111
125
|
def test_string_creates_string_column
|
112
126
|
with_change_table do |t|
|
113
127
|
@connection.expect :add_column, nil, [:delete_me, :foo, :string, {}]
|
@@ -116,6 +130,24 @@ module ActiveRecord
|
|
116
130
|
end
|
117
131
|
end
|
118
132
|
|
133
|
+
if current_adapter?(:PostgreSQLAdapter)
|
134
|
+
def test_json_creates_json_column
|
135
|
+
with_change_table do |t|
|
136
|
+
@connection.expect :add_column, nil, [:delete_me, :foo, :json, {}]
|
137
|
+
@connection.expect :add_column, nil, [:delete_me, :bar, :json, {}]
|
138
|
+
t.json :foo, :bar
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
def test_xml_creates_xml_column
|
143
|
+
with_change_table do |t|
|
144
|
+
@connection.expect :add_column, nil, [:delete_me, :foo, :xml, {}]
|
145
|
+
@connection.expect :add_column, nil, [:delete_me, :bar, :xml, {}]
|
146
|
+
t.xml :foo, :bar
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
150
|
+
|
119
151
|
def test_column_creates_column
|
120
152
|
with_change_table do |t|
|
121
153
|
@connection.expect :add_column, nil, [:delete_me, :bar, :integer, {}]
|
@@ -5,7 +5,7 @@ module ActiveRecord
|
|
5
5
|
class ColumnAttributesTest < ActiveRecord::TestCase
|
6
6
|
include ActiveRecord::Migration::TestHelper
|
7
7
|
|
8
|
-
self.
|
8
|
+
self.use_transactional_tests = false
|
9
9
|
|
10
10
|
def test_add_column_newline_default
|
11
11
|
string = "foo\nbar"
|
@@ -37,13 +37,13 @@ module ActiveRecord
|
|
37
37
|
|
38
38
|
def test_add_column_without_limit
|
39
39
|
# TODO: limit: nil should work with all adapters.
|
40
|
-
skip "MySQL wrongly enforces a limit of 255" if current_adapter?(:
|
40
|
+
skip "MySQL wrongly enforces a limit of 255" if current_adapter?(:Mysql2Adapter)
|
41
41
|
add_column :test_models, :description, :string, limit: nil
|
42
42
|
TestModel.reset_column_information
|
43
43
|
assert_nil TestModel.columns_hash["description"].limit
|
44
44
|
end
|
45
45
|
|
46
|
-
if current_adapter?(:
|
46
|
+
if current_adapter?(:Mysql2Adapter)
|
47
47
|
def test_unabstracted_database_dependent_types
|
48
48
|
add_column :test_models, :intelligence_quotient, :tinyint
|
49
49
|
TestModel.reset_column_information
|
@@ -63,12 +63,8 @@ module ActiveRecord
|
|
63
63
|
# Do a manual insertion
|
64
64
|
if current_adapter?(:OracleAdapter)
|
65
65
|
connection.execute "insert into test_models (id, wealth) values (people_seq.nextval, 12345678901234567890.0123456789)"
|
66
|
-
elsif current_adapter?(:MysqlAdapter) && Mysql.client_version < 50003 #before MySQL 5.0.3 decimals stored as strings
|
67
|
-
connection.execute "insert into test_models (wealth) values ('12345678901234567890.0123456789')"
|
68
66
|
elsif current_adapter?(:PostgreSQLAdapter)
|
69
67
|
connection.execute "insert into test_models (wealth) values (12345678901234567890.0123456789)"
|
70
|
-
elsif current_adapter?(:IBM_DBAdapter)
|
71
|
-
Person.connection.execute "insert into people (wealth, created_at, updated_at, lock_version, first_name) values (12345678901234567890.0123456789, CURRENT TIMESTAMP, CURRENT TIMESTAMP, 0, 'Jim')"
|
72
68
|
else
|
73
69
|
connection.execute "insert into test_models (wealth) values (12345678901234567890.0123456789)"
|
74
70
|
end
|
@@ -86,12 +82,7 @@ module ActiveRecord
|
|
86
82
|
TestModel.delete_all
|
87
83
|
|
88
84
|
# Now use the Rails insertion
|
89
|
-
|
90
|
-
assert_nothing_raised { Person.create :wealth => BigDecimal.new("12345678901234567890.0123456789") }
|
91
|
-
else
|
92
|
-
# First_name is a not null column, hence ensure a value is specified
|
93
|
-
assert_nothing_raised { Person.create ({:wealth => BigDecimal.new("12345678901234567890.0123456789"), :first_name => "James"}) }
|
94
|
-
end
|
85
|
+
TestModel.create :wealth => BigDecimal.new("12345678901234567890.0123456789")
|
95
86
|
|
96
87
|
# SELECT
|
97
88
|
row = TestModel.first
|
@@ -163,22 +154,15 @@ module ActiveRecord
|
|
163
154
|
assert_equal String, bob.first_name.class
|
164
155
|
assert_equal String, bob.last_name.class
|
165
156
|
assert_equal String, bob.bio.class
|
166
|
-
|
157
|
+
assert_kind_of Integer, bob.age
|
167
158
|
assert_equal Time, bob.birthday.class
|
168
|
-
|
169
|
-
if current_adapter?(:OracleAdapter)
|
170
|
-
# Oracle doesn't differentiate between date/time
|
171
|
-
assert_equal Time, bob.favorite_day.class
|
172
|
-
else
|
173
|
-
assert_equal Date, bob.favorite_day.class
|
174
|
-
end
|
175
|
-
|
159
|
+
assert_equal Date, bob.favorite_day.class
|
176
160
|
assert_instance_of TrueClass, bob.male?
|
177
161
|
assert_kind_of BigDecimal, bob.wealth
|
178
162
|
end
|
179
163
|
end
|
180
164
|
|
181
|
-
if current_adapter?(:
|
165
|
+
if current_adapter?(:Mysql2Adapter, :PostgreSQLAdapter)
|
182
166
|
def test_out_of_range_limit_should_raise
|
183
167
|
assert_raise(ActiveRecordError) { add_column :test_models, :integer_too_big, :integer, :limit => 10 }
|
184
168
|
|
@@ -3,7 +3,7 @@ require 'cases/helper'
|
|
3
3
|
module ActiveRecord
|
4
4
|
class Migration
|
5
5
|
class ColumnPositioningTest < ActiveRecord::TestCase
|
6
|
-
attr_reader :connection
|
6
|
+
attr_reader :connection
|
7
7
|
alias :conn :connection
|
8
8
|
|
9
9
|
def setup
|
@@ -23,32 +23,32 @@ module ActiveRecord
|
|
23
23
|
ActiveRecord::Base.primary_key_prefix_type = nil
|
24
24
|
end
|
25
25
|
|
26
|
-
if current_adapter?(:
|
26
|
+
if current_adapter?(:Mysql2Adapter)
|
27
27
|
def test_column_positioning
|
28
|
-
assert_equal %w(first second third), conn.columns(:testings).map
|
28
|
+
assert_equal %w(first second third), conn.columns(:testings).map(&:name)
|
29
29
|
end
|
30
30
|
|
31
31
|
def test_add_column_with_positioning
|
32
32
|
conn.add_column :testings, :new_col, :integer
|
33
|
-
assert_equal %w(first second third new_col), conn.columns(:testings).map
|
33
|
+
assert_equal %w(first second third new_col), conn.columns(:testings).map(&:name)
|
34
34
|
end
|
35
35
|
|
36
36
|
def test_add_column_with_positioning_first
|
37
37
|
conn.add_column :testings, :new_col, :integer, :first => true
|
38
|
-
assert_equal %w(new_col first second third), conn.columns(:testings).map
|
38
|
+
assert_equal %w(new_col first second third), conn.columns(:testings).map(&:name)
|
39
39
|
end
|
40
40
|
|
41
41
|
def test_add_column_with_positioning_after
|
42
42
|
conn.add_column :testings, :new_col, :integer, :after => :first
|
43
|
-
assert_equal %w(first new_col second third), conn.columns(:testings).map
|
43
|
+
assert_equal %w(first new_col second third), conn.columns(:testings).map(&:name)
|
44
44
|
end
|
45
45
|
|
46
46
|
def test_change_column_with_positioning
|
47
47
|
conn.change_column :testings, :second, :integer, :first => true
|
48
|
-
assert_equal %w(second first third), conn.columns(:testings).map
|
48
|
+
assert_equal %w(second first third), conn.columns(:testings).map(&:name)
|
49
49
|
|
50
50
|
conn.change_column :testings, :second, :integer, :after => :third
|
51
|
-
assert_equal %w(first third second), conn.columns(:testings).map
|
51
|
+
assert_equal %w(first third second), conn.columns(:testings).map(&:name)
|
52
52
|
end
|
53
53
|
end
|
54
54
|
end
|
@@ -5,10 +5,8 @@ module ActiveRecord
|
|
5
5
|
class ColumnsTest < ActiveRecord::TestCase
|
6
6
|
include ActiveRecord::Migration::TestHelper
|
7
7
|
|
8
|
-
self.
|
8
|
+
self.use_transactional_tests = false
|
9
9
|
|
10
|
-
if(!current_adapter?(:IBM_DBAdapter) )
|
11
|
-
#|| @ibm_db_rename_supported)
|
12
10
|
# FIXME: this is more of an integration test with AR::Base and the
|
13
11
|
# schema modifications. Maybe we should move this?
|
14
12
|
def test_add_rename
|
@@ -64,10 +62,10 @@ if(!current_adapter?(:IBM_DBAdapter) )
|
|
64
62
|
assert_equal '70000', default_after
|
65
63
|
end
|
66
64
|
|
67
|
-
if current_adapter?(:
|
65
|
+
if current_adapter?(:Mysql2Adapter)
|
68
66
|
def test_mysql_rename_column_preserves_auto_increment
|
69
67
|
rename_column "test_models", "id", "id_test"
|
70
|
-
|
68
|
+
assert connection.columns("test_models").find { |c| c.name == "id_test" }.auto_increment?
|
71
69
|
TestModel.reset_column_information
|
72
70
|
ensure
|
73
71
|
rename_column "test_models", "id_test", "id"
|
@@ -130,7 +128,6 @@ if(!current_adapter?(:IBM_DBAdapter) )
|
|
130
128
|
rename_column "test_models", "hat_name", "name"
|
131
129
|
assert_equal ['idx_hat_name'], connection.indexes('test_models').map(&:name)
|
132
130
|
end
|
133
|
-
end
|
134
131
|
|
135
132
|
def test_remove_column_with_index
|
136
133
|
add_column "test_models", :hat_name, :string
|
@@ -142,6 +139,10 @@ end
|
|
142
139
|
end
|
143
140
|
|
144
141
|
def test_remove_column_with_multi_column_index
|
142
|
+
# MariaDB starting with 10.2.8
|
143
|
+
# Dropping a column that is part of a multi-column UNIQUE constraint is not permitted.
|
144
|
+
skip if current_adapter?(:Mysql2Adapter) && connection.mariadb? && connection.version >= "10.2.8"
|
145
|
+
|
145
146
|
add_column "test_models", :hat_size, :integer
|
146
147
|
add_column "test_models", :hat_style, :string, :limit => 100
|
147
148
|
add_index "test_models", ["hat_style", "hat_size"], :unique => true
|
@@ -182,7 +183,6 @@ end
|
|
182
183
|
assert TestModel.columns_hash["funny"].null, "Column 'funny' must allow nulls again at this point"
|
183
184
|
end
|
184
185
|
|
185
|
-
unless current_adapter?(:IBM_DBAdapter)
|
186
186
|
def test_change_column
|
187
187
|
add_column 'test_models', 'age', :integer
|
188
188
|
add_column 'test_models', 'approved', :boolean, :default => true
|
@@ -200,7 +200,7 @@ unless current_adapter?(:IBM_DBAdapter)
|
|
200
200
|
|
201
201
|
old_columns = connection.columns(TestModel.table_name)
|
202
202
|
assert old_columns.find { |c|
|
203
|
-
default = c.
|
203
|
+
default = connection.lookup_cast_type_from_column(c).deserialize(c.default)
|
204
204
|
c.name == 'approved' && c.type == :boolean && default == true
|
205
205
|
}
|
206
206
|
|
@@ -208,16 +208,15 @@ unless current_adapter?(:IBM_DBAdapter)
|
|
208
208
|
new_columns = connection.columns(TestModel.table_name)
|
209
209
|
|
210
210
|
assert_not new_columns.find { |c|
|
211
|
-
default = c.
|
211
|
+
default = connection.lookup_cast_type_from_column(c).deserialize(c.default)
|
212
212
|
c.name == 'approved' and c.type == :boolean and default == true
|
213
213
|
}
|
214
214
|
assert new_columns.find { |c|
|
215
|
-
default = c.
|
215
|
+
default = connection.lookup_cast_type_from_column(c).deserialize(c.default)
|
216
216
|
c.name == 'approved' and c.type == :boolean and default == false
|
217
217
|
}
|
218
218
|
change_column :test_models, :approved, :boolean, :default => true
|
219
219
|
end
|
220
|
-
end
|
221
220
|
|
222
221
|
def test_change_column_with_nil_default
|
223
222
|
add_column "test_models", "contributor", :boolean, :default => true
|
@@ -272,6 +271,13 @@ end
|
|
272
271
|
assert_nil TestModel.new.first_name
|
273
272
|
end
|
274
273
|
|
274
|
+
def test_change_column_default_with_from_and_to
|
275
|
+
add_column "test_models", "first_name", :string
|
276
|
+
connection.change_column_default "test_models", "first_name", from: nil, to: "Tester"
|
277
|
+
|
278
|
+
assert_equal "Tester", TestModel.new.first_name
|
279
|
+
end
|
280
|
+
|
275
281
|
def test_remove_column_no_second_parameter_raises_exception
|
276
282
|
assert_raise(ArgumentError) { connection.remove_column("funny") }
|
277
283
|
end
|
@@ -31,7 +31,8 @@ module ActiveRecord
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def test_unknown_commands_delegate
|
34
|
-
recorder =
|
34
|
+
recorder = Struct.new(:foo)
|
35
|
+
recorder = CommandRecorder.new(recorder.new('bar'))
|
35
36
|
assert_equal 'bar', recorder.foo
|
36
37
|
end
|
37
38
|
|
@@ -169,6 +170,16 @@ module ActiveRecord
|
|
169
170
|
end
|
170
171
|
end
|
171
172
|
|
173
|
+
def test_invert_change_column_default_with_from_and_to
|
174
|
+
change = @recorder.inverse_of :change_column_default, [:table, :column, from: "old_value", to: "new_value"]
|
175
|
+
assert_equal [:change_column_default, [:table, :column, from: "new_value", to: "old_value"]], change
|
176
|
+
end
|
177
|
+
|
178
|
+
def test_invert_change_column_default_with_from_and_to_with_boolean
|
179
|
+
change = @recorder.inverse_of :change_column_default, [:table, :column, from: true, to: false]
|
180
|
+
assert_equal [:change_column_default, [:table, :column, from: false, to: true]], change
|
181
|
+
end
|
182
|
+
|
172
183
|
def test_invert_change_column_null
|
173
184
|
add = @recorder.inverse_of :change_column_null, [:table, :column, true]
|
174
185
|
assert_equal [:change_column_null, [:table, :column, false]], add
|
@@ -206,6 +217,11 @@ module ActiveRecord
|
|
206
217
|
end
|
207
218
|
|
208
219
|
def test_invert_remove_index
|
220
|
+
add = @recorder.inverse_of :remove_index, [:table, :one]
|
221
|
+
assert_equal [:add_index, [:table, :one]], add
|
222
|
+
end
|
223
|
+
|
224
|
+
def test_invert_remove_index_with_column
|
209
225
|
add = @recorder.inverse_of :remove_index, [:table, {column: [:one, :two], options: true}]
|
210
226
|
assert_equal [:add_index, [:table, [:one, :two], options: true]], add
|
211
227
|
end
|
@@ -281,17 +297,42 @@ module ActiveRecord
|
|
281
297
|
assert_equal [:remove_foreign_key, [:dogs, :people]], enable
|
282
298
|
end
|
283
299
|
|
300
|
+
def test_invert_remove_foreign_key
|
301
|
+
enable = @recorder.inverse_of :remove_foreign_key, [:dogs, :people]
|
302
|
+
assert_equal [:add_foreign_key, [:dogs, :people]], enable
|
303
|
+
end
|
304
|
+
|
284
305
|
def test_invert_add_foreign_key_with_column
|
285
306
|
enable = @recorder.inverse_of :add_foreign_key, [:dogs, :people, column: "owner_id"]
|
286
307
|
assert_equal [:remove_foreign_key, [:dogs, column: "owner_id"]], enable
|
287
308
|
end
|
288
309
|
|
310
|
+
def test_invert_remove_foreign_key_with_column
|
311
|
+
enable = @recorder.inverse_of :remove_foreign_key, [:dogs, :people, column: "owner_id"]
|
312
|
+
assert_equal [:add_foreign_key, [:dogs, :people, column: "owner_id"]], enable
|
313
|
+
end
|
314
|
+
|
289
315
|
def test_invert_add_foreign_key_with_column_and_name
|
290
316
|
enable = @recorder.inverse_of :add_foreign_key, [:dogs, :people, column: "owner_id", name: "fk"]
|
291
317
|
assert_equal [:remove_foreign_key, [:dogs, name: "fk"]], enable
|
292
318
|
end
|
293
319
|
|
294
|
-
def
|
320
|
+
def test_invert_remove_foreign_key_with_column_and_name
|
321
|
+
enable = @recorder.inverse_of :remove_foreign_key, [:dogs, :people, column: "owner_id", name: "fk"]
|
322
|
+
assert_equal [:add_foreign_key, [:dogs, :people, column: "owner_id", name: "fk"]], enable
|
323
|
+
end
|
324
|
+
|
325
|
+
def test_invert_remove_foreign_key_with_primary_key
|
326
|
+
enable = @recorder.inverse_of :remove_foreign_key, [:dogs, :people, primary_key: "person_id"]
|
327
|
+
assert_equal [:add_foreign_key, [:dogs, :people, primary_key: "person_id"]], enable
|
328
|
+
end
|
329
|
+
|
330
|
+
def test_invert_remove_foreign_key_with_on_delete_on_update
|
331
|
+
enable = @recorder.inverse_of :remove_foreign_key, [:dogs, :people, on_delete: :nullify, on_update: :cascade]
|
332
|
+
assert_equal [:add_foreign_key, [:dogs, :people, on_delete: :nullify, on_update: :cascade]], enable
|
333
|
+
end
|
334
|
+
|
335
|
+
def test_invert_remove_foreign_key_is_irreversible_without_to_table
|
295
336
|
assert_raises ActiveRecord::IrreversibleMigration do
|
296
337
|
@recorder.inverse_of :remove_foreign_key, [:dogs, column: "owner_id"]
|
297
338
|
end
|
@@ -299,6 +340,10 @@ module ActiveRecord
|
|
299
340
|
assert_raises ActiveRecord::IrreversibleMigration do
|
300
341
|
@recorder.inverse_of :remove_foreign_key, [:dogs, name: "fk"]
|
301
342
|
end
|
343
|
+
|
344
|
+
assert_raises ActiveRecord::IrreversibleMigration do
|
345
|
+
@recorder.inverse_of :remove_foreign_key, [:dogs]
|
346
|
+
end
|
302
347
|
end
|
303
348
|
end
|
304
349
|
end
|
@@ -0,0 +1,118 @@
|
|
1
|
+
require 'cases/helper'
|
2
|
+
|
3
|
+
module ActiveRecord
|
4
|
+
class Migration
|
5
|
+
class CompatibilityTest < ActiveRecord::TestCase
|
6
|
+
attr_reader :connection
|
7
|
+
self.use_transactional_tests = false
|
8
|
+
|
9
|
+
def setup
|
10
|
+
super
|
11
|
+
@connection = ActiveRecord::Base.connection
|
12
|
+
@verbose_was = ActiveRecord::Migration.verbose
|
13
|
+
ActiveRecord::Migration.verbose = false
|
14
|
+
|
15
|
+
connection.create_table :testings do |t|
|
16
|
+
t.column :foo, :string, :limit => 100
|
17
|
+
t.column :bar, :string, :limit => 100
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
teardown do
|
22
|
+
connection.drop_table :testings rescue nil
|
23
|
+
ActiveRecord::Migration.verbose = @verbose_was
|
24
|
+
ActiveRecord::SchemaMigration.delete_all rescue nil
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_migration_doesnt_remove_named_index
|
28
|
+
connection.add_index :testings, :foo, :name => "custom_index_name"
|
29
|
+
|
30
|
+
migration = Class.new(ActiveRecord::Migration[4.2]) {
|
31
|
+
def version; 101 end
|
32
|
+
def migrate(x)
|
33
|
+
remove_index :testings, :foo
|
34
|
+
end
|
35
|
+
}.new
|
36
|
+
|
37
|
+
assert connection.index_exists?(:testings, :foo, name: "custom_index_name")
|
38
|
+
assert_raise(StandardError) { ActiveRecord::Migrator.new(:up, [migration]).migrate }
|
39
|
+
assert connection.index_exists?(:testings, :foo, name: "custom_index_name")
|
40
|
+
end
|
41
|
+
|
42
|
+
def test_migration_does_remove_unnamed_index
|
43
|
+
connection.add_index :testings, :bar
|
44
|
+
|
45
|
+
migration = Class.new(ActiveRecord::Migration[4.2]) {
|
46
|
+
def version; 101 end
|
47
|
+
def migrate(x)
|
48
|
+
remove_index :testings, :bar
|
49
|
+
end
|
50
|
+
}.new
|
51
|
+
|
52
|
+
assert connection.index_exists?(:testings, :bar)
|
53
|
+
ActiveRecord::Migrator.new(:up, [migration]).migrate
|
54
|
+
assert_not connection.index_exists?(:testings, :bar)
|
55
|
+
end
|
56
|
+
|
57
|
+
def test_references_does_not_add_index_by_default
|
58
|
+
migration = Class.new(ActiveRecord::Migration) {
|
59
|
+
def migrate(x)
|
60
|
+
create_table :more_testings do |t|
|
61
|
+
t.references :foo
|
62
|
+
t.belongs_to :bar, index: false
|
63
|
+
end
|
64
|
+
end
|
65
|
+
}.new
|
66
|
+
|
67
|
+
ActiveRecord::Migrator.new(:up, [migration]).migrate
|
68
|
+
|
69
|
+
assert_not connection.index_exists?(:more_testings, :foo_id)
|
70
|
+
assert_not connection.index_exists?(:more_testings, :bar_id)
|
71
|
+
ensure
|
72
|
+
connection.drop_table :more_testings rescue nil
|
73
|
+
end
|
74
|
+
|
75
|
+
def test_timestamps_have_null_constraints_if_not_present_in_migration_of_create_table
|
76
|
+
migration = Class.new(ActiveRecord::Migration) {
|
77
|
+
def migrate(x)
|
78
|
+
create_table :more_testings do |t|
|
79
|
+
t.timestamps
|
80
|
+
end
|
81
|
+
end
|
82
|
+
}.new
|
83
|
+
|
84
|
+
ActiveRecord::Migrator.new(:up, [migration]).migrate
|
85
|
+
|
86
|
+
assert connection.columns(:more_testings).find { |c| c.name == 'created_at' }.null
|
87
|
+
assert connection.columns(:more_testings).find { |c| c.name == 'updated_at' }.null
|
88
|
+
ensure
|
89
|
+
connection.drop_table :more_testings rescue nil
|
90
|
+
end
|
91
|
+
|
92
|
+
def test_timestamps_have_null_constraints_if_not_present_in_migration_for_adding_timestamps_to_existing_table
|
93
|
+
migration = Class.new(ActiveRecord::Migration) {
|
94
|
+
def migrate(x)
|
95
|
+
add_timestamps :testings
|
96
|
+
end
|
97
|
+
}.new
|
98
|
+
|
99
|
+
ActiveRecord::Migrator.new(:up, [migration]).migrate
|
100
|
+
|
101
|
+
assert connection.columns(:testings).find { |c| c.name == 'created_at' }.null
|
102
|
+
assert connection.columns(:testings).find { |c| c.name == 'updated_at' }.null
|
103
|
+
end
|
104
|
+
|
105
|
+
def test_legacy_migrations_get_deprecation_warning_when_run
|
106
|
+
migration = Class.new(ActiveRecord::Migration) {
|
107
|
+
def up
|
108
|
+
add_column :testings, :baz, :string
|
109
|
+
end
|
110
|
+
}
|
111
|
+
|
112
|
+
assert_deprecated do
|
113
|
+
migration.migrate :up
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|