1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

20 commits

Author SHA1 Message Date
Ryuta Kamizono
6fd81d2d8e Return nil if table comment is blank 2017-09-22 23:04:54 +09:00
Alecs Popa
72a22fa929 Implement change_table_comment and change_column_comment for MySql Adapter 2017-09-22 10:32:26 +03:00
Ryuta Kamizono
376e19c93e Prefer to place a table options before force: :cascade (#28005)
I was added a table options after `force: :cascade` in #17569 for not
touching existing tests (reducing diff). But `force: :cascade` is not an
important information. So I prefer to place a table options before
`force: :cascade`.
2017-08-27 22:16:05 +09:00
Ryuta Kamizono
5bef4c64f0 Remove redundant unless current_adapter?(:OracleAdapter) 2017-07-28 17:26:41 +09:00
Akira Matsuda
4caf751fff Merge pull request #28695 from koic/integer_type_has_precision_option_in_oracle
Fix an AR test of schema dump when using Oracle
2017-07-27 19:31:53 +09:00
Kir Shatrov
831be98f9a Use frozen-string-literal in ActiveRecord 2017-07-19 22:27:07 +03:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590, reversing
changes made to afb66a5a59.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
Koichi ITO
569cd97c80 Fix an AR test of schema dump when using Oracle 2017-04-07 19:03:04 +09:00
Koichi ITO
56e2c9e1f0 Ignore AR tests of index comment when using Oracle 2017-04-05 19:20:48 +09:00
Ryuta Kamizono
6d37cd918d Omit redundant using: :btree for schema dumping 2017-02-13 23:12:04 +09:00
Ryuta Kamizono
7f0567b43b Fix that change_column lose a comment 2016-12-05 07:16:08 +09:00
Xavier Noria
80e66cc4d9 normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
Xavier Noria
9617db2078 applies new string literal convention in activerecord/test
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 18:26:53 +02:00
Ryuta Kamizono
2db8514d21
Treat blank comments as no comment for indexes
Follow up of 1683410.

Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
2016-04-29 17:52:37 -07:00
Ryuta Kamizono
74b5112282 Dump indexes in create_table for generates SQL in one query
If the adapter supports indexes in create table, it generates SQL
in one query.
2016-04-20 10:24:18 +09:00
Jon Moss
1909095aea Remove unecessary comment 2016-04-19 16:48:40 -04:00
Jeremy Daer
1683410c5e
Database comments: Treat blank comments as no comment. Don't dump blank comments. 2016-04-19 12:31:23 -07:00
Jeremy Daer
485e7f25f2
Database comments: switch to keyword args for new table options
* Switch to keyword args where we can without breaking compat.
* Use add_table_options! for :options, too.
* Some code polish.
2016-04-18 12:42:24 -07:00
Andrey Novikov
c690b9ce39
Add support for specifying comments for tables, columns, and indexes.
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
2016-04-16 10:17:26 +03:00