- 08 10月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Currently blank comment does not dump to `db/schema.rb`. But created it even if specified blank.
-
- 16 9月, 2016 1 次提交
-
-
由 yuuji.yaginuma 提交于
-
- 02 9月, 2016 1 次提交
-
-
由 Xavier Noria 提交于
-
- 18 8月, 2016 1 次提交
-
-
invalid column type /activerecord/lib/active_record/connection_adapters /abstract/schema_definitions.rb:306 type = type.to_sym Changed to the following to handle nil case: type = type.to_sym if type Added regression test for this case: /activerecord/test/cases/migration_test.rb:554 if current_adapter?(:SQLite3Adapter) def test_allows_sqlite3_rollback_on_invalid_column_type Person.connection.create_table :something, force: true do |t| t.column :number, :integer t.column :name, :string t.column :foo, :bar end assert Person.connection.column_exists?(:something, :foo) assert_nothing_raised { Person.connection.remove_column :something, :foo, :bar } assert !Person.connection.column_exists?(:something, :foo) assert Person.connection.column_exists?(:something, :name) assert Person.connection.column_exists?(:something, :number) ensure Person.connection.drop_table :something, if_exists: true end end
-
- 16 8月, 2016 2 次提交
-
-
由 oss92 提交于
-
由 Rafael Mendonça França 提交于
Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
-
- 14 8月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 10 8月, 2016 1 次提交
-
-
由 Genadi Samokovarov 提交于
If you call `remove_index` with wrong options, say a type, like I did, you get: ``` == 20160810072541 RemoveUniqueIndexOnGoals: migrating ========================= -- remove_index(:goal, {:coulmn=>:kid_id, :unique=>true}) rails aborted! StandardError: An error has occurred, this and all later migrations canceled: undefined method `ArgumentError' for #<ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0x007fb7dec91b28> ``` What happened is that I mistyped column (coulmn) and got a `NoMethodError`, because of a missing comma during the raise. This made Ruby think we're calling the method `ArgumentError`.
-
- 07 8月, 2016 3 次提交
-
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
-
- 02 8月, 2016 1 次提交
-
-
由 Alex Robbin 提交于
-
- 16 7月, 2016 1 次提交
-
-
由 Prathamesh Sonpatki 提交于
- Followup of https://github.com/rails/rails/pull/23179.
-
- 14 7月, 2016 1 次提交
-
-
由 Grey Baker 提交于
Keeps schema migration inserts as a single commit, so we still get all of the benefits of https://github.com/rails/rails/commit/42dd2336b31a8d98776d039a2b9fd7f834156a78, but allows for easier git diff-ing. Fixes #25504.
-
- 08 7月, 2016 1 次提交
-
-
由 Alex Kitchens 提交于
This includes minor grammar fixes throughout the file.
-
- 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 次提交
- 01 6月, 2016 1 次提交
-
-
由 Sean Griffin 提交于
The code incorrectly assumes that the option was written as `foreign_key: true`, but that is not always the case. This now mirrors the behavior of reverting `add_foreign_key`. The code was changed to use kwargs while I was touching it, as well. This could really use a refactoring to go through the same code paths as `add_refernce` in the future, so we don't duplicate default values. Fixes #25169
-
- 25 4月, 2016 2 次提交
-
-
由 Ryuta Kamizono 提交于
Example: create_table :users do |t| t.string :name t.index 'lower(name) varchar_pattern_ops' end Fixes #19090. Fixes #21765. Fixes #21819. Fixes #24359. Signed-off-by: NJeremy Daer <jeremydaer@gmail.com>
-
由 Seva Orlov 提交于
There is no need to fetch all table indexes in remove_index if name is specified. If name is wrong, then StatementInvalid will be raised. Signed-off-by: NJeremy Daer <jeremydaer@gmail.com>
-
- 24 4月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Follow up to #24685. `insert_versions_sql` is not public API.
-
- 23 4月, 2016 2 次提交
-
-
由 Jeremy Daer 提交于
Re. 6e098284
-
https://github.com/rails/rails/commit/42dd2336b31a8d98776d039a2b9fd7f834156a78由 Vipul A M 提交于
https://github.com/rails/rails/commit/42dd2336b31a8d98776d039a2b9fd7f834156a78 changed INSERT INTO versions to run in 1 single query. This breaks for sqlite versions < 3.7.11, which is especially the case on Ubuntu 12.04 LTS, that has SQLite version 3.7.9 as default. So we check for support for multi insert, before performing single query inserts, else fallback to older version of running multiple queries. [Vipul A M & Yasuo Honda]
-
- 21 4月, 2016 2 次提交
-
-
由 प्रथमेश Sonpatki 提交于
-
由 yuuji.yaginuma 提交于
Follow up to #24221.
-
- 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.
-
- 17 4月, 2016 1 次提交
-
-
由 Alex Handley 提交于
- Add link for finding the addional options for index. - Add example for unique index as this is a common requirement. - Add link in guide for index options.
-
- 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
-
- 27 3月, 2016 1 次提交
-
-
由 Bogdan 提交于
Fix description for method ActiveRecord::ConnectionAdapters::SchemaStatements#add_timestamps [ci skip]
-
- 17 3月, 2016 1 次提交
-
-
由 Greg Molnar 提交于
-
- 10 3月, 2016 1 次提交
-
-
由 Salman Afzal Siddiqui 提交于
The comments of add_foreign_key method was displaying incorrect constraint name.
-
- 08 2月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
Follow up to #23508.
-
- 04 2月, 2016 2 次提交
-
-
由 Ryuta Kamizono 提交于
-
- 01 2月, 2016 1 次提交
-
-
由 Ryuta Kamizono 提交于
`initialize_schema_migrations_table` is called in every migrations. https://github.com/rails/rails/blob/v5.0.0.beta1/activerecord/lib/active_record/migration.rb#L1080 https://github.com/rails/rails/blob/v5.0.0.beta1/activerecord/lib/active_record/schema.rb#L51 This means that extra `show variables` is called regardless of the existence of `schema_migrations` table. This change is to avoid extra `show variables` if `schema_migrations` table exists.
-
- 30 1月, 2016 3 次提交
-
-
由 Ryuta Kamizono 提交于
-
由 yui-knk 提交于
`ActiveRecord::ConnectionAdapters::SchemaStatements#columns` is defined here as an interface method here. So changes to raise `NotImplementedError` same as `tables`, `views` ...etc.
-
由 yui-knk 提交于
If `AR.primary_key` is called for a table who has composite primary key, the method returns `nil`. This behavior sometimes generates invalid SQL. The first time developers notice to invalid SQL is when they execute SQL. This commit enables developers to know they are doing something dangerous as soon as possible.
-
- 28 1月, 2016 1 次提交
-
-
由 Mikhail Grachev 提交于
This line causes an error when executing the command: `rails db:drop db:create db:schema:load` ActiveRecord::StatementInvalid: PG::SyntaxError: ERROR: syntax error at or near "{" LINE 1: ...NSERT INTO "schema_migrations" (version) VALUES (#{v}), (#{v...
-
- 27 1月, 2016 1 次提交
-
-
We found that inserting all 600 schema_migrations for our mid-sized app takes about a minute on a cloud based CI environment. I assume that the original code did not use multi-row-insert because SQLite3 was not supporting the syntax back then, but it's been supported since 3.7.11: http://www.sqlite.org/releaselog/3_7_11.html
-