Dirkjan Bussink
ba4f4f8a01
Treat mysql in the name as a mysql driver
2014-01-17 18:05:20 +01:00
Erik Michaels-Ober
e8b84ab1b4
Add support for mysql2 adapter
2010-09-10 02:13:56 +08:00
Neeraj Singh
22b020db3e
db:drop:all throws error when database does not exist [ #2997 state:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-15 10:33:52 -07:00
Jeremy Kemper
05d7409ae5
Prefer utf8_unicode_ci (better) over utf8_general_ci (faster)
2009-08-27 23:09:21 -07:00
David Heinemeier Hansson
f3c7bbeedd
Added db/seeds.rb as a default file for storing seed data for the database. Can be loaded with rake db:seed (or created alongside the db with db:setup). (This is also known as the "Stop Putting Gawd Damn Seed Data In Your Migrations" feature) [DHH]
...
Conflicts:
railties/CHANGELOG
2009-08-18 16:08:50 +01:00
Joshua Nichols
ebb6606a4d
Only load db/schema.rb if it exists; otherwise, display a message to run db:migrate or remove active_record in environment.rb.
...
[#3012 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-09 20:19:31 -07:00
Will Bryant
ba146a84d0
re-enable db:schema:dump so db:migrate:redo dumps the schema after migrating back up
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1412 state:committed]
2009-02-06 13:40:58 +13:00
Joshua Peek
ed70830713
Switch to Rack based session stores.
2008-12-15 16:33:31 -06:00
Pratik Naik
dbbae5e00e
Merge with docrails
2008-12-07 03:27:53 +01:00
Aliaksey Kandratsenka
a0bc480e1d
establish mysql connection before dropping database
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#63 state:committed]
2008-12-01 21:38:30 +01:00
Michael Koziarski
a8fc494dbb
Manually load the DB config rather than firing the whole initializer [Gerrit Kaiser]
2008-12-01 21:38:30 +01:00
Luca Guidi
1bc267d216
Make sure recreate MySQL test database with the proper encoding and collation [ #1165 state:resolved]
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1165 state:committed]
2008-10-03 22:08:55 +02:00
Philip Hallstrom
c47525a583
make db:migrate:redo rake task accept an optional VERSION to target that specific migration to redo
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-17 11:14:21 +02:00
Antonio Cangiano
854cf3d721
Fix for SQLite's db creation warnings [status:committed #614 ]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-09-09 23:56:37 -05:00
Nick Sieger
3151d96663
Revert "Change all databases.rake adapter 'when' statements to use regexes."
...
This reverts commit 3d2512d38d2e28b3ea669139f7c7b0307522aa72.
2008-08-29 14:12:09 -05:00
Nick
1a81f156bd
Change all databases.rake adapter 'when' statements to use regexes.
...
This is more friendly to JRuby/JDBC adapters (with names like 'jdbcmysql')
and leaves the door open to alternate implementations of adapters in the
future.
2008-08-29 14:12:08 -05:00
Matthew Rudy Jacobs
eb4668b26a
rake db:fixtures:load and db:fixtures:identify now accept a FIXTURES_PATH option eg. "rake db:fixtures:load FIXTURES_PATH=spec/fixtures"
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#792 state:committed]
2008-08-09 18:36:40 +02:00
Sebastian A. Espindola
0176e6adb3
Added db:charset support to PostgreSQL. [ #556 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 04:11:52 +01:00
Jacek Becela
697ee1a50d
Enable loading fixtures from arbitrary locations. [ #586 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 01:32:01 +01:00
Tapajós
0d241f4434
Use full path in database tasks so commands will work outside of Rails root [ #612 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-13 14:19:03 -05:00
Jeremy Kemper
6ffe32160e
Rely on quieter db:test:load task
2008-06-17 16:01:48 -07:00
Jeremy Kemper
8e74a434b8
Don't dump schema for every test run, just when migrations are run
2008-06-16 03:47:15 -07:00
Pratik Naik
98dc582742
Merge docrails.
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-05-25 12:29:00 +01:00
Tarmo Tänav
3fee2378ed
Use 'public' schema path when connecting to 'postgres' database. [ #170 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-05-13 18:25:30 +01:00
Tarmo Tänav
4dedc7ddca
Use 'postgres' database instead of 'template1'
...
The 'postgres' database is meant for use by utilities and third
party applications. CONNECT permission to the 'template1' database
is usually only available to superusers which is why 'postgres'
should be preferred as users whith "CREATE DATABASE" permissions
are not neccessarily superusers.
2008-05-13 17:34:47 +01:00
Pete Deffendol
c26d10563e
PostgreSQL: update rake tasks to use full settings from database.yml
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-05-04 15:59:34 +12:00
Pete Deffendol
205750c8de
PostgreSQL: Connect to template1 database when creating or dropping db
...
* The template1 database is always available on a PostgreSQL install
* The previous behavior expected a database with the same name as the
connecting user, which may not be available
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#38 state:resolved]
2008-05-04 12:20:14 +12:00
Jeremy Kemper
25eeea7197
PostgreSQL: use create_ and drop_database for rake tasks. Closes #9045 [ez, nicksieger]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9183 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 05:01:33 +00:00
David Heinemeier Hansson
c4be0dbca9
Fixed charset/collation for rake db:create ( closes #11331 ) [matt]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9170 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 21:16:17 +00:00
David Heinemeier Hansson
3704f4ba2e
Fix new migration versions
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9126 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 22:14:04 +00:00
David Heinemeier Hansson
c00de99f69
Switched to UTC-timebased version numbers for migrations and the schema. This will as good as eliminate the problem of multiple migrations getting the same version assigned in different branches. Also added rake db:migrate:up/down to apply individual migrations that may need to be run when you merge branches ( closes #11458 ) [jbarnette]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9122 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-28 21:21:01 +00:00
Pratik Naik
3d2177df26
Fix database rake tasks to work with charset/collation and show proper error messages on failure. Closes #11301 [matt]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9004 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-10 11:42:01 +00:00
Michael Koziarski
3028ca5955
Clear active connections before trying to drop the database. Allows db:drop to work with posgresql. Closes #10559 [jqr]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8876 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-15 23:16:01 +00:00
David Heinemeier Hansson
64b4c18e15
Refactor check for local databases ( closes #10539 ) [parcelbrat]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8535 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-03 00:35:23 +00:00
Jeremy Kemper
e21c48baf7
db:sessions:clear task uses session_table_name method. Closes #10631 [Cheah Chu Yeow]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8522 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-02 09:03:56 +00:00
Jeremy Kemper
072b9d9fba
SQLite: db:drop:all doesn't fail silently if the database is already open. Closes #10577 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8519 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-02 08:28:58 +00:00
David Heinemeier Hansson
f60e3aa1ae
Fixed that local database creation should consider 127.0.0.1 local ( closes #9026 ) [parcelbrat]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8388 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-14 22:32:54 +00:00
David Heinemeier Hansson
3aa54c5e44
Added db:migrate:redo and db:migrate:reset for rerunning existing migrations #10431 , ( closes #10432 ) [matt]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8383 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-14 17:51:02 +00:00
David Heinemeier Hansson
9187ed8656
Added db:migrate:redo for rerunning existing migrations ( closes #10431 ) [matt]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8382 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-14 17:47:56 +00:00
Jeremy Kemper
2c951efed3
Don't check for pending migrations if Active Record isn't loaded
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8338 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-09 04:18:28 +00:00
Jeremy Kemper
699da7001b
The test task stops with a warning if you have pending migrations. Closes #10377 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8324 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-06 18:57:19 +00:00
David Heinemeier Hansson
e47392b81f
Added db:fixtures:identity as a way of locating what ID a foxy fixture was assigned ( closes #10332 ) [jbarnette]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8248 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-01 20:53:15 +00:00
David Heinemeier Hansson
2e12afaefe
Fixed that db:reset would use migrations instead of loading db/schema.rb [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8123 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-09 21:58:24 +00:00
David Heinemeier Hansson
2a74d71e49
Added db:rollback to rollback the schema one version (or multiple as specified by STEP) [Jeffrey Allan Hardy]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8039 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-26 21:11:07 +00:00
Jeremy Kemper
9264bdc8f6
db:create works with remote databases whereas db:create:all only createsdatabases on localhost. Closes #9753 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7718 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-02 03:20:52 +00:00
David Heinemeier Hansson
f0055871a3
Follow our own conventions ( closes #6506 ) [packagethief]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7603 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-23 22:16:09 +00:00
Jeremy Kemper
ccc9549436
Revert [7574]. Closes #7521 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7594 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-23 11:31:37 +00:00
David Heinemeier Hansson
35e382627e
Added rake db:version to get the current schema version from the command line ( closes #7521 ) [pelargir]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7574 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-22 22:12:10 +00:00
David Heinemeier Hansson
9809dc4540
Added VERBOSE option to rake db:migrate to turn off output #8204 [jbarnette]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7566 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-22 18:28:53 +00:00
David Heinemeier Hansson
694f15758c
Added db:drop:all to drop all databases declared in config/database.yml [DHH]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7489 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-15 22:56:07 +00:00