1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/cases/migration
Ryuta Kamizono fdf371ab06 Support for foreign keys in create table
If foreign keys specified in create table, generated SQL is slightly more
efficient.

Definition:

    ```
    create_table :testings do |t|
      t.references :testing_parent, foreign_key: true
    end
    ```

Before:

    ```
    CREATE TABLE "testings" ("id" serial primary key, "testing_parent_id" integer);
    ALTER TABLE "testings" ADD CONSTRAINT "fk_rails_a196c353b2" FOREIGN KEY ("testing_parent_id") REFERENCES "testing_parents" ("id");
    ```

After:

    ```
    CREATE TABLE "testings" ("id" serial primary key, "testing_parent_id" integer, CONSTRAINT "fk_rails_a196c353b2" FOREIGN KEY ("testing_parent_id") REFERENCES "testing_parents" ("id"));
    ```
2015-09-20 12:46:11 +09:00
..
change_schema_test.rb Map :bigint as NUMBER(19) sql_type by using :limit => 19 for Oracle 2015-06-01 12:23:20 +00:00
change_table_test.rb no more require minitest mock 2015-08-27 02:14:30 +05:30
column_attributes_test.rb Closes rails/rails#18864: Renaming transactional fixtures to transactional tests 2015-03-16 11:35:44 -07:00
column_positioning_test.rb Remove unused accessor 2015-01-19 08:18:08 +09:00
columns_test.rb Add reversible syntax for change_column_default 2015-06-26 16:25:13 -04:00
command_recorder_test.rb Removed mocha from Active Record Part 2 2015-09-16 21:57:10 +05:30
create_join_table_test.rb tests, favor drop_table and :if_exists over raw SQL. 2015-03-02 17:43:01 +01:00
foreign_key_test.rb Add table name prefix and suffix support to add_foreign_key and remove_foreign_key methods 2015-06-25 14:49:08 +03:00
helper.rb Bring original puts back after finishing tests 2014-08-29 10:34:26 +09:00
index_test.rb raise a better exception for renaming long indexes 2014-11-20 17:37:54 -08:00
logger_test.rb Closes rails/rails#18864: Renaming transactional fixtures to transactional tests 2015-03-16 11:35:44 -07:00
pending_migrations_test.rb no more require minitest mock 2015-08-27 02:14:30 +05:30
postgresql_geometric_types_test.rb Add missing data types for ActiveRecord migrations 2015-06-08 10:57:03 +03:00
references_foreign_key_test.rb Support for foreign keys in create table 2015-09-20 12:46:11 +09:00
references_index_test.rb Use type column first in multi-column indexes 2014-10-24 16:34:30 -04:00
references_statements_test.rb Closes rails/rails#18864: Renaming transactional fixtures to transactional tests 2015-03-16 11:35:44 -07:00
rename_table_test.rb Closes rails/rails#18864: Renaming transactional fixtures to transactional tests 2015-03-16 11:35:44 -07:00
table_and_index_test.rb tests, use drop_table if_exists: true in our test suite. 2015-01-20 13:30:12 +01:00