- 05 8月, 2017 1 次提交
-
-
由 Yasuo Honda 提交于
MySQL 5.7 and PostgreSQL 9.6 allow table identifiers have the dollar sign. * MySQL 5.7 https://dev.mysql.com/doc/refman/5.7/en/identifiers.html > Permitted characters in unquoted identifiers: > ASCII: [0-9,a-z,A-Z$_] (basic Latin letters, digits 0-9, dollar, underscore) * PostgreSQL 9.6 https://www.postgresql.org/docs/9.6/static/sql-syntax-lexical.html > SQL identifiers and key words must begin with a letter (a-z, but also letters with diacritical marks and non-Latin letters) or an underscore (_). Subsequent characters in an identifier or key word can be letters, underscores, digits (0-9), or dollar signs ($). Note that dollar signs are not allowed in identifiers according to the letter of the SQL standard, so their use might render applications less portable. The SQL standard will not define a key word that contains digits or starts or ends with an underscore, so identifiers of this form are safe against possible conflict with future extensions of the standard. Address #30044 [Yasuo Honda & Ryuta Kamizono]
-
- 20 7月, 2017 1 次提交
-
-
由 Kir Shatrov 提交于
-
- 13 7月, 2017 1 次提交
-
-
由 Jan Pieper 提交于
The list of enabled adapter extensions in the schema dump isn't sorted by default, so it may happen that the sorting changes over time. If you're using a VCS, a change to the sorting results in a diff without any real change. Sorting the list should solve this problem.
-
- 02 7月, 2017 1 次提交
-
-
由 Matthew Draper 提交于
This reverts commit 3420a145, reversing changes made to afb66a5a.
-
- 01 7月, 2017 1 次提交
-
-
由 Kir Shatrov 提交于
-
- 03 6月, 2017 1 次提交
-
-
由 Genadi Samokovarov 提交于
-
- 16 5月, 2017 1 次提交
-
-
由 Guillermo Iguaran 提交于
-
- 09 4月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
* Fix the comment on `formatted_version` * Extract `define_params` * Remove duplicated guard clause for `@version`
-
- 06 4月, 2017 1 次提交
-
-
由 Anton Chuchkalov 提交于
-
- 28 2月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
`tables` returns only tables now.
-
- 14 2月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
Add `default_index_type?` to the generic schema dumper doesn't have the knowledge about an index type
-
- 13 2月, 2017 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 29 10月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 11 10月, 2016 2 次提交
-
-
由 Ryuta Kamizono 提交于
-
由 Ryuta Kamizono 提交于
Follow up to #26735. If `table_options` returns `{ comment: nil }`, `create_table` line is broken. Example: ```ruby create_table "accounts", force: :cascade, do |t| ```
-
- 10 10月, 2016 2 次提交
-
-
由 Ryuta Kamizono 提交于
`migration_keys` includes `name` but `name` is not a column option.
-
由 Ryuta Kamizono 提交于
```ruby # Before t.index ["firm_id", "type", "rating"], name: "company_index", order: {"rating"=>:desc}, using: :btree # After t.index ["firm_id", "type", "rating"], name: "company_index", order: { rating: :desc }, using: :btree ```
-
- 08 10月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Currently blank comment does not dump to `db/schema.rb`. But created it even if specified blank.
-
- 23 8月, 2016 2 次提交
-
-
由 Ryuta Kamizono 提交于
`format_string` is used for standardized column types/arguments spaces. Now the standardization was removed at df84e986.
-
由 Rafael Mendonça França 提交于
Now the schema dumper by default doesn't align the types and arguments in the ruby format anymore.
-
- 17 8月, 2016 1 次提交
-
-
由 Tim Petricola 提交于
-
- 16 8月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
-
- 07 8月, 2016 1 次提交
-
-
由 Xavier Noria 提交于
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
-
- 02 7月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Actually schema dumper/creation supports composite primary key (#21614). Therefore it should not show the warning about composite primary key in connection adapter. This change moves the warning to `AttributeMethods::PrimaryKey` and suppress the warning for habtm join table. Fixes #25388.
-
- 10 6月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 12 5月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Rails 5.0 has been dropped Ruby 1.9 support. I think no need magic comment anymore.
-
- 20 4月, 2016 2 次提交
-
-
由 Ryuta Kamizono 提交于
If the adapter supports indexes in create table, it generates SQL in one query.
-
由 Jeremy Daer 提交于
-
- 19 4月, 2016 1 次提交
-
-
由 Jeremy Daer 提交于
* Switch to keyword args where we can without breaking compat. * Use add_table_options! for :options, too. * Some code polish.
-
- 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
-
- 11 3月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 08 3月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Currently the results of `column.serial?` is not correct. For `column.serial?` correctly working, initialize `column.table_name` immediately.
-
- 06 2月, 2016 1 次提交
-
-
由 Sean Griffin 提交于
This reverts commit 99801c6a. Ultimately it doesn't matter whether `add_index` or `t.index` are used in the schema dumper in any meaningful way. There are gems out there which hook into the old behavior for things like indexing materialized views. Since the reverted commit doesn't seem to add much benefit, there's no reason for us to break these gems.
-
- 08 1月, 2016 1 次提交
-
-
由 schneems 提交于
This PR introduces a key/value type store to Active Record that can be used for storing internal values. It is an alternative implementation to #21237 cc @sgrif @matthewd. It is possible to run your tests against your production database by accident right now. While infrequently, but as an anecdotal data point, Heroku receives a non-trivial number of requests for a database restore due to this happening. In these cases the loss can be large. To prevent against running tests against production we can store the "environment" version that was used when migrating the database in a new internal table. Before executing tests we can see if the database is a listed in `protected_environments` and abort. There is a manual escape valve to force this check from happening with environment variable `DISABLE_DATABASE_ENVIRONMENT_CHECK=1`.
-
- 23 9月, 2015 1 次提交
-
-
由 Yves Senn 提交于
These new methods are used from the Active Record model layer to determine which relations are viable to back a model. These new methods allow us to change `conn.tables` in the future to only return tables and no views. Same for `conn.table_exists?`. The goal is to provide the following introspection methods on the connection: * `tables` * `table_exists?` * `views` * `view_exists?` * `data_sources` (views + tables) * `data_source_exists?` (views + tables)
-
- 20 9月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
Example: create_table :barcodes, primary_key: ["region", "code"] do |t| t.string :region t.integer :code end
-
- 17 9月, 2015 1 次提交
-
-
由 schneems 提交于
The schema_migrations table name is configurable. We should use this value when checking for ignored table names when dumping schema instead of a hardcoded value.
-
- 13 9月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
Now in sqlite3, mysql and mysql2 adapters, SchemaDumper dump a view as a table. It is incorrect behavior. This change excludes a view in schema.rb.
-
- 20 5月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 03 5月, 2015 1 次提交
-
-
由 Ryuta Kamizono 提交于
If the adapter supports indexes in create table, generated SQL is slightly more efficient.
-