Pete Elmore [Thu, 7 Mar 2013 03:46:55 +0000 (19:46 -0800)]
Fix PostGIS.
ronen barzel [Mon, 11 Feb 2013 20:25:33 +0000 (20:25 +0000)]
More robust handling of foreign keys with schema namespaces
Closes issue #89
ronen barzel [Mon, 4 Feb 2013 23:13:54 +0000 (23:13 +0000)]
version bump 1.0.1
ronen barzel [Thu, 24 Jan 2013 12:29:01 +0000 (12:29 +0000)]
spec fix: integerize values for index lengths (mysql2 gives integer lengths, mysql gives string)
ronen barzel [Thu, 24 Jan 2013 12:25:52 +0000 (12:25 +0000)]
Revert "spec fix: use eql? to test hash equality ignoring entry order"
This reverts commit
f9a0879775e13fbe134cdbea6269dee1e1bdbaed.
ronen barzel [Thu, 24 Jan 2013 12:21:04 +0000 (12:21 +0000)]
spec fix: use eql? to test hash equality ignoring entry order
ronen barzel [Thu, 24 Jan 2013 12:13:03 +0000 (12:13 +0000)]
README release notes update
ronen barzel [Thu, 24 Jan 2013 12:12:48 +0000 (12:12 +0000)]
no need for backwards-compatibility with incorrect :lengths keyword, since it wasn't working anyway.
ronen barzel [Thu, 24 Jan 2013 12:09:39 +0000 (12:09 +0000)]
Merge branch 'master' of github.com:lomba/schema_plus
ronen barzel [Thu, 24 Jan 2013 11:26:07 +0000 (11:26 +0000)]
add spec for index length in migration (mysql only)
ronen barzel [Thu, 24 Jan 2013 11:26:24 +0000 (03:26 -0800)]
Merge pull request #88 from teleological/v1.0.0-patch-2
Accept :length option for index definition
Riley [Wed, 23 Jan 2013 14:00:50 +0000 (09:00 -0500)]
Accept :length option for index definition
* IndexDefinition member is called :lengths, but dumped/read as :length
* Preserved backwards-compatible support for :lengths
ronen barzel [Sun, 20 Jan 2013 22:59:31 +0000 (22:59 +0000)]
update README history
ronen barzel [Sat, 19 Jan 2013 13:00:27 +0000 (13:00 +0000)]
update README history
ronen barzel [Sun, 20 Jan 2013 22:13:00 +0000 (22:13 +0000)]
bug fix: foreign keys should have a consistent default name.
(also, this uncovered that a spec was creating a duplicate constraint.)
ronen barzel [Sun, 20 Jan 2013 21:51:27 +0000 (21:51 +0000)]
add --rspec command and ARGV to runspecs
ronen barzel [Sun, 20 Jan 2013 21:42:29 +0000 (21:42 +0000)]
fix references matcher to work even if column names aren't specified. remove redundant file.
ronen barzel [Sun, 20 Jan 2013 22:14:50 +0000 (22:14 +0000)]
bug fix: rename when table has more than one constraint.
it could choosing the wrong index.
ronen barzel [Sat, 19 Jan 2013 12:55:46 +0000 (12:55 +0000)]
add spec to test renaming of table with multiple foreign_key constraints.
see issue #87 and its pull request
ronen barzel [Sat, 19 Jan 2013 12:53:38 +0000 (04:53 -0800)]
Merge pull request #87 from teleological/v1.0.0-patch
When renaming tables, rename constraints
Riley [Fri, 18 Jan 2013 22:39:38 +0000 (16:39 -0600)]
When renaming tables, rename constraints
* Was using new table name; fails for > 1 constraint on table
ronen barzel [Thu, 17 Jan 2013 21:27:03 +0000 (21:27 +0000)]
comment for mysql vs mysql2
ronen barzel [Thu, 17 Jan 2013 08:14:08 +0000 (08:14 +0000)]
attempt to get around rake 10.0.3 issue with ruby 1.9.2
see https://github.com/jimweirich/rake/issues/157
ronen barzel [Thu, 17 Jan 2013 02:59:55 +0000 (02:59 +0000)]
bug fixes: don't dump :case_sensitive => false for index with an expression that includes 'lower(name)', and properly dump multi-column case_insensitive indexes.
Closes #84
ronen barzel [Thu, 17 Jan 2013 01:54:50 +0000 (01:54 +0000)]
Document and add Argument error for invalidity of using :case_sensitive => false with an expression.
Closes #85
ronen barzel [Thu, 17 Jan 2013 01:31:15 +0000 (01:31 +0000)]
README typo fix
closes #86
ronen barzel [Sun, 16 Dec 2012 21:51:53 +0000 (21:51 +0000)]
specify required_ruby_version
ronen barzel [Thu, 6 Dec 2012 11:21:25 +0000 (11:21 +0000)]
update release notes
ronen barzel [Thu, 6 Dec 2012 11:16:45 +0000 (03:16 -0800)]
Merge pull request #76 from denispeplin/master
Use new hash syntax in README
denispeplin [Thu, 6 Dec 2012 10:50:04 +0000 (14:50 +0400)]
Fix bug introduced during the syntax update.
denispeplin [Thu, 6 Dec 2012 09:50:21 +0000 (13:50 +0400)]
Ruby 1.8 support was dropped, modify hashes syntax.
ronen barzel [Tue, 4 Dec 2012 23:09:09 +0000 (23:09 +0000)]
version bump 1.0.0
ronen barzel [Tue, 4 Dec 2012 22:34:19 +0000 (22:34 +0000)]
fix travis build
debugged travis locally using method described here: http://ruby-journal.com/debug-your-failed-test-in-travis-ci/
ronen barzel [Tue, 4 Dec 2012 07:17:34 +0000 (07:17 +0000)]
reorder Gemfiles
hopefully this will get around the strange travis behavior after including Gemfile.base -- it was reporting
could not find gem '<gemname> (>=0) ruby' in the gems available on this machine
ronen barzel [Tue, 4 Dec 2012 00:11:22 +0000 (00:11 +0000)]
put each db adapter requirement into separate Gemfile, to enable development/testing without all db's installed on your machine.
updated travis config, Rakefile, runspecs, and README accordingly
ronen barzel [Mon, 3 Dec 2012 22:59:43 +0000 (22:59 +0000)]
force mysql ~>2.8.1 dependency, which is what rails 3.2's mysql adapter requires
ronen barzel [Mon, 3 Dec 2012 22:33:44 +0000 (22:33 +0000)]
fix gitignore for gemfiles/*.lock
why did i think this was working before?
ronen barzel [Mon, 3 Dec 2012 22:32:57 +0000 (22:32 +0000)]
add multi schema bug fix to release notes
ronen barzel [Mon, 3 Dec 2012 22:32:34 +0000 (22:32 +0000)]
split spec into two
ronen barzel [Mon, 3 Dec 2012 14:50:05 +0000 (06:50 -0800)]
Merge pull request #74 from bhavinkamani/schema_aware_foreign_key
BUGFIX: schema aware postgresql foreign_keys and reverse_foreign_keys
Bhavin Kamani [Mon, 3 Dec 2012 14:04:25 +0000 (19:34 +0530)]
BUGFIX: schema aware postgresql foreign_keys and reverse_foreign_keys. Added multiple schema foreign_key spec
ronen barzel [Wed, 28 Nov 2012 10:55:14 +0000 (10:55 +0000)]
Add some comments.
ronen barzel [Tue, 27 Nov 2012 03:02:57 +0000 (03:02 +0000)]
oops again, i didn't properly test mysql version. fixed missing &block.
ronen barzel [Tue, 27 Nov 2012 02:59:07 +0000 (02:59 +0000)]
oops take out debugging code
ronen barzel [Tue, 27 Nov 2012 02:55:37 +0000 (02:55 +0000)]
mysql support for DB_DEFAULT
ronen barzel [Tue, 27 Nov 2012 01:58:42 +0000 (01:58 +0000)]
add DB_DEFAULT.
closes #61
ronen barzel [Mon, 26 Nov 2012 16:07:11 +0000 (16:07 +0000)]
README updates
ronen barzel [Mon, 26 Nov 2012 16:03:16 +0000 (16:03 +0000)]
use postgres current_schemas() function rather than parsing and passing rails schema_search_path parameter.
obviates quoting bug fix shown in commit of issue #65
ronen barzel [Mon, 26 Nov 2012 16:01:49 +0000 (16:01 +0000)]
bug fix: SchemaDumper.ignore_tables needs to support regexps.
addresses #65 (albeit implement a different way than the asociated pull request).
ronen barzel [Mon, 26 Nov 2012 15:58:54 +0000 (15:58 +0000)]
clean out vestigial view definitions (could be left over from earlier failed specs)
ronen barzel [Mon, 26 Nov 2012 14:50:06 +0000 (14:50 +0000)]
add specs to verifiy multiple-schema isolation.
addresses #62
ronen barzel [Mon, 26 Nov 2012 14:40:25 +0000 (14:40 +0000)]
clean up Rakefile for database creation; use it in .travis.yml
ronen barzel [Mon, 26 Nov 2012 12:17:53 +0000 (12:17 +0000)]
cleanups to get to 100% code coverage
ronen barzel [Mon, 26 Nov 2012 12:10:03 +0000 (12:10 +0000)]
fix for mysql: can't rename index when foreign key still exists.
ronen barzel [Mon, 26 Nov 2012 11:28:43 +0000 (11:28 +0000)]
fix Rakefile so that it will report errors if rspec gets errors.
*this* time travis-ci will fail for sure! :)
(previous checkin was good to do, but didn't affect travis-ci since it doesn't run ./runspecs)
ronen barzel [Mon, 26 Nov 2012 10:49:01 +0000 (10:49 +0000)]
fix runspecs to return error status.
so now travis will properly report failures. and this commit will cause travis to fail, because of bug in earlier commit.
ronen barzel [Sun, 25 Nov 2012 23:35:07 +0000 (23:35 +0000)]
gitignore gemfiles/*.lock
ronen barzel [Sun, 25 Nov 2012 23:31:00 +0000 (23:31 +0000)]
update README to document index renaming. And update release notes.
closes #64
ronen barzel [Sun, 25 Nov 2012 23:21:37 +0000 (23:21 +0000)]
when a table renamed, rename the foreign key constraints
(except for sqlite3, which doesn't support that)
addresses #64
ronen barzel [Sun, 25 Nov 2012 23:00:42 +0000 (23:00 +0000)]
when table is renamed, should rename fk auto-indexes
addresses #64
ronen barzel [Sun, 25 Nov 2012 22:52:41 +0000 (22:52 +0000)]
when a table is renamed, rename rails-named indexes
addresses #64
ronen barzel [Sun, 25 Nov 2012 21:01:16 +0000 (21:01 +0000)]
index definition should not raise error when testing equality against nil.
addresses #64
ronen barzel [Sun, 25 Nov 2012 17:27:51 +0000 (17:27 +0000)]
identify auto-created indexes by name "fk__#{table}_#{column}". remove auto-created index when removing a foreign key.
also identified and fixed a bug inadvertently introduced in previous checkin: specifying :foreign_key => false suppressed :index => true
closes #50
ronen barzel [Sun, 25 Nov 2012 15:28:42 +0000 (15:28 +0000)]
Merge branch 'master' of github.com:lomba/schema_plus
ronen barzel [Wed, 14 Nov 2012 15:57:15 +0000 (15:57 +0000)]
update README release notes
ronen barzel [Wed, 14 Nov 2012 15:54:31 +0000 (07:54 -0800)]
Merge pull request #72 from jonleighton/fix_default_expr_dump
Fix schema dumper with complex expressions
Jon Leighton [Wed, 14 Nov 2012 10:42:00 +0000 (10:42 +0000)]
Fix schema dumper with complex expressions
Previously, these were getting dumped without quote marks being escaped,
leading to syntax errors in the schema.rb.
ronen barzel [Sun, 11 Nov 2012 11:15:16 +0000 (11:15 +0000)]
replace development dependency 'ruby-debugger19' with 'debugger'
ronen barzel [Sun, 11 Nov 2012 08:36:07 +0000 (08:36 +0000)]
create_view can be defined using a Relation
(really, can take anything that responds to :to_sql)
ronen barzel [Sun, 11 Nov 2012 08:35:14 +0000 (08:35 +0000)]
update & tweak README
ronen barzel [Sat, 10 Nov 2012 22:54:24 +0000 (22:54 +0000)]
include index order in schema dump.
this, along with the previous two commits, closes #60
ronen barzel [Wed, 7 Nov 2012 12:14:22 +0000 (12:14 +0000)]
add spec for add_index(..., :order => ...). get it to work for postgresql
ronen barzel [Tue, 6 Nov 2012 23:49:27 +0000 (23:49 +0000)]
IndexDefinition.orders now works for postgresql and sqlite3. ordered indexes aren't supported by mysql.
ronen barzel [Wed, 7 Nov 2012 22:40:05 +0000 (22:40 +0000)]
update version to 1.0.0.pre for now.
ronen barzel [Wed, 7 Nov 2012 22:37:01 +0000 (22:37 +0000)]
legacy cleanup: remove monkey patch specific to rails 3.1 from abstract adapter
ronen barzel [Wed, 7 Nov 2012 22:36:38 +0000 (22:36 +0000)]
legacy cleanup: remove guard for rails >= 3.0 from index spec
ronen barzel [Wed, 7 Nov 2012 22:28:20 +0000 (22:28 +0000)]
drop legacy support: gemspec now requires rails >= 3.2. No longer test rails < 3.2, nor ruby < 1.9.
ronen barzel [Wed, 7 Nov 2012 08:08:26 +0000 (08:08 +0000)]
another bug fix on maintaining foreign keys.
for mysql: it throws an error attempting to detect foreign keys on a nonexistent table.
ronen barzel [Sat, 3 Nov 2012 02:23:12 +0000 (02:23 +0000)]
README release notes update
ronen barzel [Sat, 3 Nov 2012 01:47:17 +0000 (01:47 +0000)]
New :foreign_key => { … } specifier in migration column statements and methods
Closes #69
ronen barzel [Sat, 3 Nov 2012 01:46:51 +0000 (01:46 +0000)]
add spec to make sure we're dumping fk name
ronen barzel [Sat, 3 Nov 2012 01:39:23 +0000 (01:39 +0000)]
add (failing) specs for new :foreign_key => { … } syntax
ronen barzel [Fri, 2 Nov 2012 23:11:06 +0000 (23:11 +0000)]
merge two different migration_spec files
ronen barzel [Fri, 2 Nov 2012 23:04:53 +0000 (23:04 +0000)]
tidy up specs regarding earlier move to inline schema definition
ronen barzel [Fri, 2 Nov 2012 22:45:09 +0000 (22:45 +0000)]
clean up migration_spec
ronen barzel [Fri, 2 Nov 2012 22:44:58 +0000 (22:44 +0000)]
bug fix on the change_colum checkin: don't try to remove existing foreign key if we're about to drop the whole table.
ronen barzel [Fri, 2 Nov 2012 21:09:27 +0000 (21:09 +0000)]
clean up foreign key specs
ronen barzel [Fri, 2 Nov 2012 16:28:57 +0000 (16:28 +0000)]
update README release notes
ronen barzel [Fri, 2 Nov 2012 16:24:10 +0000 (16:24 +0000)]
bug fix: change_column should maintain existing foreign key even when config.foreign_keys.auto_create = false
Closes #71
ronen barzel [Fri, 2 Nov 2012 16:20:46 +0000 (16:20 +0000)]
add spec for dropping foreign key via change_column
ronen barzel [Fri, 2 Nov 2012 15:32:11 +0000 (15:32 +0000)]
add failing spec -- migration should maintain foreign key on column change
ronen barzel [Thu, 1 Nov 2012 14:26:39 +0000 (14:26 +0000)]
specs cleanup: move schema & model definitions inline rather than loading from external files.
this has two advantages: easier to know what schema is being tested, and can change the schema for an individual set of examples without worrying about implications on other tests.
ronen barzel [Mon, 29 Oct 2012 19:53:13 +0000 (19:53 +0000)]
README update
Brent Wheeldon [Mon, 29 Oct 2012 14:43:03 +0000 (10:43 -0400)]
Sort FKs in dump to prevent ordering changes
ronen barzel [Mon, 29 Oct 2012 19:30:32 +0000 (19:30 +0000)]
add (failing) spec for sorting foreign keys in schema dump
ronen barzel [Sat, 20 Oct 2012 16:43:18 +0000 (17:43 +0100)]
better internal documentation for abstract methods
ronen barzel [Tue, 9 Oct 2012 11:05:38 +0000 (04:05 -0700)]
Merge pull request #66 from loco2/index_kind
Fixes for postgres index type and expression support
Eugene Bolshakov [Tue, 9 Oct 2012 08:52:26 +0000 (09:52 +0100)]
Wrap expression in parantheses if necessary when adding an index
Eugene Bolshakov [Tue, 9 Oct 2012 08:15:14 +0000 (09:15 +0100)]
Actually use the :kind index attribute for postgres
ronen barzel [Thu, 4 Oct 2012 22:29:25 +0000 (23:29 +0100)]
rspec deprecation: change expect { … }.should to proper expect {…}.to