- 22 8月, 2015 1 次提交
-
-
由 Sean Griffin 提交于
Several changes were made in #21110 which I am strongly opposed to. (this is what I get for going on vacation. :trollface:) No type should be introduced into the generic `ActiveRecord::Type` namespace, and *certainly* should not be registered into the registry unconstrained unless it is supported by *all* adapters (which basically means that it was specified in the ANSI SQL standard). I do not think `# :nodoc:` ing the type is sufficient, as it still makes the code of Rails itself very unclear as to what the role of that class is. While I would argue that this shouldn't even be a super class, and that MySql and PG's JSON types are only superficially duplicated (they might look the same but will change for different reasons in the future). However, I don't feel strongly enough about it as a point of contention (and the biggest cost of harming the blameability has already occured), so I simply moved the superclass into a namespace where its role is absolutely clear. After this change, `attribute :foo, :json` will once again work with MySQL and PG, but not with Sqlite3 or any third party adapters. Unresolved questions -------------------- The types that and adapter publishes (at least those are unique to that adapter, and not adding additional behavior like `MysqlString` should probably be part of the adapter's public API. Should we standardize the namespace for these, and document them?
-
- 21 8月, 2015 1 次提交
-
-
由 Yasuo Honda 提交于
-
- 18 8月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
As of MySQL 5.7.8, MySQL supports a native JSON data type. Example: create_table :json_data_type do |t| t.json :settings end
-
- 21 7月, 2015 1 次提交
-
-
由 Jori Hardman 提交于
-
- 27 6月, 2015 1 次提交
-
-
由 Prem Sichanugrist 提交于
Passing `:from` and `:to` to `change_column_default` makes this command reversible as user has defined its previous state. So, instead of having the migration command as: change_column_default(:posts, :state, "draft") They can write it as: change_column_default(:posts, :state, from: nil, to: "draft")
-
- 27 5月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
Related with #17370.
-
- 20 5月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
This line introduced by the commit fd398475 for using `Arel::Visitors::BindVisitor`. Currently it is not used.
-
- 19 5月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 13 5月, 2015 1 次提交
-
-
由 Mehmet Emin İNAÇ 提交于
-
- 06 5月, 2015 1 次提交
-
-
由 Tony Miller 提交于
-
- 04 5月, 2015 3 次提交
-
-
由 Ryuta Kamizono 提交于
-
由 Ryuta Kamizono 提交于
MySQL does not support partial index. And, the create index algorithm in create table can not be specified.
-
由 Ryuta Kamizono 提交于
Some databases like MySQL allow defining collation charset for specific columns.
-
- 03 5月, 2015 3 次提交
-
-
由 Ryuta Kamizono 提交于
-
由 Tony Miller 提交于
`change_column_null` is doc'ed only in ActiveRecord::ConnectionAdapters::SchemaStatements, so it would make sense to :nodoc: it elsewhere.
-
由 Ryuta Kamizono 提交于
-
- 07 4月, 2015 2 次提交
-
-
由 Rafael Mendonça França 提交于
It behaves in the same way that the abstract adapter. [ci skip]
-
由 Mehmet Emin İNAÇ 提交于
-
- 06 4月, 2015 1 次提交
-
-
由 Mehmet Emin İNAÇ 提交于
-
- 23 3月, 2015 2 次提交
-
-
由 Gaurav Sharma 提交于
-
由 Gaurav Sharma 提交于
-
- 20 3月, 2015 1 次提交
-
-
由 amitkumarsuroliya 提交于
-
- 17 3月, 2015 1 次提交
-
-
由 Yasuo Honda 提交于
to support MySQL 5.7.6 `optimizer_switch='derived_merge=on'`
-
- 06 3月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
Example: create_table :foos do |t| t.string :string_utf8_bin, charset: 'utf8', collation: 'utf8_bin' t.text :text_ascii, charset: 'ascii' end
-
- 04 3月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 26 2月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
MySQL unicode support is not only `utf8mb4`. Then, The index length problem is not only `utf8mb4`. http://dev.mysql.com/doc/refman/5.6/en/charset-unicode.html SELECT * FROM information_schema.character_sets WHERE maxlen > 3; +--------------------+----------------------+------------------+--------+ | CHARACTER_SET_NAME | DEFAULT_COLLATE_NAME | DESCRIPTION | MAXLEN | +--------------------+----------------------+------------------+--------+ | utf8mb4 | utf8mb4_general_ci | UTF-8 Unicode | 4 | | utf16 | utf16_general_ci | UTF-16 Unicode | 4 | | utf16le | utf16le_general_ci | UTF-16LE Unicode | 4 | | utf32 | utf32_general_ci | UTF-32 Unicode | 4 | +--------------------+----------------------+------------------+--------+
-
- 25 2月, 2015 2 次提交
-
-
由 Court3nay 提交于
-
由 Ryuta Kamizono 提交于
Only `primary_key` should be extracted by d47357e2 in #19030, but `new_coclumn_definition` was also extracted because #17631 is merged previously, then #19030 is auto merged without conflicts. This commit is for move back `new_column_definition` into `TableDefinition`.
-
- 24 2月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
Example: create_table :foos, id: :primary_key, limit: 8 do |t| end # or create_table :foos, id: false do |t| t.column :id, limit: 8 end
-
- 22 2月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 20 2月, 2015 2 次提交
-
-
由 Ryuta Kamizono 提交于
It is also necessary to format a time column like a datetime column.
-
由 Ryuta Kamizono 提交于
-
- 18 2月, 2015 2 次提交
-
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
This reverts commit 1502caef. The test suite for the mysql adapter broke when this commit was used with MySQL 5.6. Conflicts: activerecord/CHANGELOG.md
-
- 16 2月, 2015 1 次提交
-
-
由 Sean Griffin 提交于
We do this in the adapter classes specifically, so the types aren't registered if we don't use that adapter. Constants under the PostgreSQL namespace for example are never loaded if we're using mysql.
-
- 12 2月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 11 2月, 2015 2 次提交
-
-
由 Ryuta Kamizono 提交于
`precision: 0` was not dumped by f1a0fa9e. However, `precision: 0` is valid value for PostgreSQL timestamps.
-
由 Sean Griffin 提交于
The various databases don't actually need significantly different handling for this behavior, and they can achieve it without knowing about the type of the object. The old implementation was returning a string, which will cause problems such as breaking TZ aware attributes, and making it impossible for the adapters to supply their logic for time objects.
-
- 08 2月, 2015 2 次提交
-
-
由 Ryuta Kamizono 提交于
If timestamp column have the precision, it need to format according to the precision of timestamp column.
-
由 Ryuta Kamizono 提交于
-