1. 05 11月, 2015 13 次提交
  2. 04 11月, 2015 8 次提交
  3. 03 11月, 2015 7 次提交
  4. 02 11月, 2015 12 次提交
    • A
      Merge pull request #21841 from yui-knk/fix_migration_status · 38ddfefe
      Andrew White 提交于
      Make `db:migrate:status` to render `1_some.rb` format migrate files.
      38ddfefe
    • A
      Merge pull request #22156 from yui-knk/fix_test_mysql · 22e17695
      Andrew White 提交于
      Fix test_database_created_by_root of mysql
      22e17695
    • Y
      Fix test_database_created_by_root of mysql · 26967754
      yui-knk 提交于
      `DEFAULT_CHARSET` and `DEFAULT_COLLATION` in `MySQLDatabaseTasks`
      was changed by 322068fe.
      This test case also should be changed.
      26967754
    • Y
      Merge pull request #22142 from r11runner/query-guide-first-last-default-scope · 63c01454
      Yves Senn 提交于
      [ci skip] querying guide methods first and last: mentioning the influence of the default scope
      63c01454
    • Y
      Make `db:migrate:status` to render `1_some.rb` format migrate files. · a7beeb7f
      yui-knk 提交于
      `1_valid_people_have_last_names.rb` and
      `20150823202140_create_users.rb` are valid migration file name.
      But `1_valid_people_have_last_names.rb` is rendered as
      `********** NO FILE **********` when `rake db:migrate:status`.
      
      Fix to this bug, this commit includes
      
      * define some API private methdos and a Constant
        `match_to_migration_filename?`, `parse_migration_filename`, and
        `MigrationFilenameRegexp`
      * use these methods in `db:migrate:status` task
      
      Example:
      
      These files are in `db/migrate`
      
      * 1_valid_people_have_last_names.rb
      * 20150819202140_irreversible_migration.rb
      * 20150823202140_add_admin_flag_to_users.rb
      * 20150823202141_migration_tests.rb
      * 2_we_need_reminders.rb
      * 3_innocent_jointable.rb
      
      we can migrate all of them.
      
      Before
      
      ```shell
      $ bundle exec rake db:migrate:status
      
      ...
      
       Status   Migration ID    Migration Name
      --------------------------------------------------
         up     001             ********** NO FILE **********
         up     002             ********** NO FILE **********
         up     003             ********** NO FILE **********
         up     20150819202140  Irreversible migration
         up     20150823202140  Add admin flag to users
         up     20150823202141  Migration tests
      ```
      
      After
      
      ```shell
      $ bundle exec rake db:migrate:status
      
      ...
      
       Status   Migration ID    Migration Name
      --------------------------------------------------
         up     001             Valid people have last names
         up     002             We need reminders
         up     003             Innocent jointable
         up     20150819202140  Irreversible migration
         up     20150823202140  Add admin flag to users
         up     20150823202141  Migration tests
      ```
      a7beeb7f
    • A
      Merge pull request #22152 from y-yagi/remove_sass-cache_from_gitignore · ab351036
      Andrew White 提交于
      remove unnecessary `.sass-cache` from plugin's gitignore template
      ab351036
    • A
      Merge pull request #22133 from yui-knk/sanitize_sql_for_order · c88cda58
      Andrew White 提交于
      Define `sanitize_sql_for_order` for AR and use it inside `preprocess_…
      c88cda58
    • Y
      Define `sanitize_sql_for_order` for AR and use it inside `preprocess_order_args` · 6011ab85
      yui-knk 提交于
      This commit follows up of 6a6dbb4c.
      6011ab85
    • A
      Merge pull request #22090 from kamipo/bigint_default_nil · 57493eae
      Andrew White 提交于
      Allow bigint with default nil for avoiding auto increment primary key
      57493eae
    • R
      Allow bigint with default nil for avoiding auto increment primary key · 1fa6c9e5
      Ryuta Kamizono 提交于
      Such as #10404, #18206.
      1fa6c9e5
    • A
      Merge pull request #22061 from kamipo/remove_default_charset_and_collation · fb6f0d40
      Andrew White 提交于
      Remove `DEFAULT_CHARSET` and `DEFAULT_COLLATION`
      fb6f0d40
    • R
      Remove `DEFAULT_CHARSET` and `DEFAULT_COLLATION` in `MySQLDatabaseTasks` · 322068fe
      Ryuta Kamizono 提交于
      This reverts commit f6ca7e4e.
      
      The default collation of utf8 in MySQL is the `utf8_general_ci`, and
      this should not be changed. This is because, the better collation in the
      all locales is not exists, optimal collation in own application is not
      known other than themselves.
      
      The `utf8_unicode_ci` is known as Japanese killer in Japan, there are
      serious impacts in search of Japanese.
      
      MySQL implements the `utf8_unicode_ci` according to the Unicode
      Collation Algorithm (UCA) described at http://www.unicode.org/reports/tr10/,
      but the `utf8_unicode_ci` have only partial support for the UCA, only
      primary level key comparison implemented (also known as L1 (Base
      characters) comparison).
      
      Because L1 (Base characters) comparison does not distinguish between the
      presence or absence of the accent, if distinction of the accent is
      important there is a serious impact (e.g. Japanese).
      
      Example:
      
      ```
      > SHOW CREATE TABLE `dicts`\G
      *************************** 1. row ***************************
             Table: dicts
      Create Table: CREATE TABLE `dicts` (
        `word` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
        `meaning` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
      1 row in set (0.00 sec)
      
      > INSERT INTO `dicts` VALUES ('ハハ', 'mother'), ('パパ', 'father');
      Query OK, 2 rows affected (0.00 sec)
      
      > SELECT * FROM `dicts` WHERE `word` = 'ハハ';
      +--------+---------+
      | word   | meaning |
      +--------+---------+
      | ハハ   | mother  |
      | パパ   | father  |
      +--------+---------+
      2 rows in set (0.00 sec)
      
      > CREATE UNIQUE INDEX `unique_index_word` ON `dicts`(`word`);
      ERROR 1062 (23000): Duplicate entry 'ハハ' for key 'unique_index_word'
      ```
      
      We should omit the collation entirely rather than providing a default.
      Then the choice is the responsibility of the server and MySQL distribution.
      322068fe