- 22 8月, 2017 2 次提交
-
-
由 Ryuta Kamizono 提交于
Currently `SchemaDumper` is only customizable for column options. But 3rd party connection adapters (oracle-enhanced etc) need to customizable for table or index dumping also. To make it possible, I introduced adapter specific `SchemaDumper` classes for that.
-
由 Ryuta Kamizono 提交于
-
- 21 8月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 20 8月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
This is only used for the internal `column_spec` and `column_spec_for_primary_key`.
-
- 20 7月, 2017 1 次提交
-
-
由 Kir Shatrov 提交于
-
- 02 7月, 2017 1 次提交
-
-
由 Matthew Draper 提交于
This reverts commit 3420a145, reversing changes made to afb66a5a.
-
- 01 7月, 2017 1 次提交
-
-
由 Kir Shatrov 提交于
-
- 07 2月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
`ColumnDumper#migration_keys` was extracted to customize keys for standardized column arguments widths. But the feature was removed in df84e986. The internal method is no longer used for that.
-
- 04 2月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
The PR #27384 changed integer-like primary key to be autoincrement unless an explicit default. This means that integer-like primary key is restored as autoincrement unless dumping the default nil explicitly. We should dump integer-like primary key with default nil correctly.
-
- 02 2月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
MySQL generated columns: https://dev.mysql.com/doc/refman/5.7/en/create-table-generated-columns.html MariaDB virtual columns: https://mariadb.com/kb/en/mariadb/virtual-computed-columns/ Declare virtual columns with `t.virtual name, type: …, as: "expression"`. Pass `stored: true` to persist the generated value (false by default). Example: create_table :generated_columns do |t| t.string :name t.virtual :upper_name, type: :string, as: "UPPER(name)" t.virtual :name_length, type: :integer, as: "LENGTH(name)", stored: true t.index :name_length # May be indexed, too! end Closes #22589
-
- 06 12月, 2016 1 次提交
-
-
由 Jon McCartie 提交于
-
- 29 10月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 11 10月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 10 10月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
`migration_keys` includes `name` but `name` is not a column option.
-
- 07 8月, 2016 2 次提交
-
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
-
- 20 4月, 2016 1 次提交
-
-
由 Jeremy Daer 提交于
-
- 16 4月, 2016 1 次提交
-
-
由 Andrey Novikov 提交于
Comments are specified in migrations, stored in database itself (in its schema), and dumped into db/schema.rb file. This allows to generate good documentation and explain columns and tables' purpose to everyone from new developers to database administrators. For PostgreSQL and MySQL only. SQLite does not support comments at the moment. See docs for PostgreSQL: http://www.postgresql.org/docs/current/static/sql-comment.html See docs for MySQL: http://dev.mysql.com/doc/refman/5.7/en/create-table.html
-
- 12 3月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Follow up to #18228. In MySQL and PostgreSQL, primary key is to be `NOT NULL` implicitly. But in SQLite it must be specified `NOT NULL` explicitly.
-
- 11 3月, 2016 2 次提交
-
-
由 Ryuta Kamizono 提交于
Before: ```ruby create_table "big_numbers", force: :cascade do |t| t.integer "bigint_column", limit: 8 end ``` After: ```ruby create_table "big_numbers", force: :cascade do |t| t.bigint "bigint_column" end ```
-
由 Ryuta Kamizono 提交于
-
- 29 2月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Actually `:name` and `:type` are not column options.
-
- 08 2月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
A return value of `schema_type` is used by: 1. primary key type: using as `symbol.inspect` 2. normal column type: using as `symbol.to_s` It is better to return symbol.
-
- 13 1月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Example: create_table :posts do |t| t.datetime :published_at, default: -> { 'NOW()' } end
-
- 13 10月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
Current master branch includes many schema dumping improvements. It extract these features to the appropriate files.
-
- 28 9月, 2015 1 次提交
-
-
由 amitkumarsuroliya 提交于
-
- 09 7月, 2015 1 次提交
-
-
由 Jean Boussier 提交于
When working on engines that supports multiple databases, it's very annoying to have a different schema.rb output based on which database you use. MySQL being the primary offender. This patch should reduce the disparities a bit.
-
- 19 5月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 04 5月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
Some databases like MySQL allow defining collation charset for specific columns.
-
- 04 3月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 18 2月, 2015 1 次提交
-
-
由 Sean Griffin 提交于
-
- 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.
-
- 31 1月, 2015 1 次提交
-
-
由 Sean Griffin 提交于
Remaining are `limit`, `precision`, `scale`, and `type` (the symbol version). These will remain on the column, since they mirror the options to the `column` method in the schema definition DSL
-
- 29 12月, 2014 1 次提交
-
-
由 Ryuta Kamizono 提交于
If it is not a default primary key, correctly dump the type and options.
-
- 02 12月, 2014 1 次提交
-
-
由 Yves Senn 提交于
-
- 30 10月, 2014 1 次提交
-
-
由 claudiob 提交于
-
- 11 9月, 2014 1 次提交
-
-
由 Jeremy Kemper 提交于
Allows :limit defaults to be changed without pulling the rug out from under old migrations that omitted :limit because it matched the default at the time.
-
- 18 6月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
If we want to have type decorators mess with the attribute, but not the column, we need to stop type casting on the column. Where possible, we changed the tests to test the value of `column_defaults`, which is public API. `Column#default` is not.
-
- 12 6月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
We're not longer using `ipaddr` in schema dumper
-