aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/mysql2/active_schema_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Use frozen-string-literal in ActiveRecordKir Shatrov2017-07-191-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Correct spellingBenjamin Fleischer2017-02-051-2/+2
| | | | | | | ``` go get -u github.com/client9/misspell/cmd/misspell misspell -w -error -source=text . ```
* Fix `add_index` to normalize column names and optionsRyuta Kamizono2016-10-031-0/+3
| | | | | | | | | | Currently does not work the following code. ```ruby add_index(:people, ["last_name", "first_name"], order: { last_name: :desc, first_name: :asc }) ``` Normalize column names and options to fix the issue.
* Add three new rubocop rulesRafael Mendonça França2016-08-161-2/+2
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* remove redundant curlies from hash argumentsXavier Noria2016-08-061-5/+5
|
* modernizes hash syntax in activerecordXavier Noria2016-08-061-15/+15
|
* applies new string literal convention in activerecord/testXavier Noria2016-08-061-10/+10
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Extract `add_sql_comment!` methodRyuta Kamizono2016-04-291-3/+3
| | | | | | Refactor of #22911. Signed-off-by: Jeremy Daer <jeremydaer@gmail.com>
* Fix test failure in `adapters/mysql/active_schema_test.rb`Ryuta Kamizono2015-11-201-1/+1
| | | | Follow up to #21601.
* Deprecate `#table_exists?`, `#tables` and passing arguments to `#talbes`yui-knk2015-11-091-4/+4
| | | | | | | | | | Reported on #21509, how views is treated by `#tables` are differ by each adapters. To fix this different behavior, after Rails 5.0 is released, deprecate `#tables`. And `#table_exists?` would check both tables and views. To make their behavior consistent with `#tables`, after Rails 5.0 is released, deprecate `#table_exists?`.
* Should test both mysql adaptersRyuta Kamizono2015-09-201-10/+8
| | | | | Some test cases are testing only mysql adapter. We should test mysql2 adapter also.
* make it possible to run AR tests with bin/testYves Senn2015-06-111-1/+1
|
* More exercise the create index sql testsRyuta Kamizono2015-05-041-0/+37
|
* Failure to rollback t.timestamps when within a change_table migrationnoam2014-12-031-1/+1
| | | | | | | | | | | | | When running the following migration: change_table(:table_name) { |t| t/timestamps } The following error was produced: wrong number of arguments (2 for 1) .... /connection_adapters/abstract/schema_statements.rb:851:in `remove_timestamps' This is due to `arguments` containing an empty hash as its second argument.
* synchronize code and docs for `timestamps` and `add_timestamps`.Yves Senn2014-11-201-1/+1
| | | | | | | | This makes the following changes: * warn if `:null` is not passed to `add_timestamps` * `timestamps` method docs link to `add_timestamps` docs * explain where additional options go * adjust examples to include `null: false` (to prevent deprecation warnings)
* Change the default `null` value for timestampsSean Griffin2014-08-121-1/+1
| | | | | | | As per discussion, this changes the model generators to specify `null: false` for timestamp columns. A warning is now emitted if `timestamps` is called without a `null` option specified, so we can safely change the behavior when no option is specified in Rails 5.
* Add ConnectionHelper to refactor tests.Guo Xiang Tan2014-04-031-5/+4
|
* No need to use begin/end blocksRafael Mendonça França2014-03-261-8/+8
|
* No need to gsub the stringRafael Mendonça França2014-03-261-1/+1
|
* Fixes bugs for using indexes in CREATE TABLE by adding checks for table ↵Steve Rice2014-03-251-2/+4
| | | | | | | | existence Also: - updates tests by stubbing table_exists? method - adds entry for creating indexes in CREATE TABLE to changelog
* create indexes inline in CREATE TABLE for MySQLCody Cutrer2014-03-251-0/+11
| | | | | | | | This is important, because adding an index on a temporary table after it has been created would commit the transaction Conflicts: activerecord/CHANGELOG.md
* Use teardown helper method.Guo Xiang Tan2014-03-141-1/+1
| | | | | | | | Follow-Up to https://github.com/rails/rails/pull/14348 Ensure that SQLCounter.clear_log is called after each test. This is a step to prevent side effects when running tests. This will allow us to run them in random order.
* Fix broken mysql testJon Leighton2013-05-031-16/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | test_mysql_integer_not_null_defaults in test/cases/defaults_test.rb was failing. This test relies on the connection being in strict mode. By default a new connection is not in strict mode, but Active Record automatically places it in strict mode. ActiveSchemaTest overwrites the connection's #execute method in order to prevent SQL statements from actually being executed. One of the operations which is performed in ActiveSchema test is a #recreate_database. Since 2088bf27981137a2c6c8b2f718f33b417b4045af, recreate_database on mysql or mysql2 will trigger a reconnect. Due to the implementation of the hacking of #execute in ActiveSchemaTest, this reconnect would take place, but the connection would *not* be placed in strict mode because #execute had been overridden to prevent SQL queries hitting the database. Therefore, after ActiveSchemaTest, the connection would no longer be in strict mode, causing test_mysql_integer_not_null_defaults to fail. I don't think that the way that ActiveSchemaTest is implemented is particularly nice or clean, but I have taken steps to make its hacks more isolated - it now create a separate connection object which is thrown away after the test, and the hacks are applied on the singleton class of this object.
* Add support for FULLTEXT and SPATIAL indexes using the :type flag for MySQL.Ken Mazaika2013-03-271-3/+8
|
* Checks :algorithm argument for valid valuesDan McClain2013-03-261-0/+4
|
* Adds support for concurrent indexing in PostgreSQL adapterDan McClain2013-03-251-8/+11
| | | | | | | | Adds support for algorithm option in MySQL indexes Moves USING and algorithm options upstream The syntax is still specific to the Adapter, so the actual executed string happens in the corresponding adapter
* Custom index type support with :using.doabit2013-03-241-0/+12
|
* Removed unnecessary blockAnupam Choudhury2013-03-221-2/+1
|
* please use ruby -I lib:test path/to/test.rb, or export RUBY_OPTAaron Patterson2011-06-061-1/+1
|
* Refactor Active Record test connection setup. Please see the ↵Jon Leighton2011-06-041-1/+1
| | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
* update tests for mysql2 supportBrian Lopez2010-08-021-0/+125