schema_plus
13 years agoMerge pull request #59 from sj26/foreign_key_definition_on_delete_comment
ronen barzel [Thu, 7 Jun 2012 08:15:25 +0000 (01:15 -0700)]
Merge pull request #59 from sj26/foreign_key_definition_on_delete_comment

Fix typo, remove whitespace

13 years agoFix typo, remove whitespace
Samuel Cochran [Thu, 7 Jun 2012 04:32:05 +0000 (12:32 +0800)]
Fix typo, remove whitespace

13 years agoinclude dependency status badge
ronen barzel [Mon, 4 Jun 2012 14:41:47 +0000 (15:41 +0100)]
include dependency status badge

13 years agolocal Gemfile.lock updates
ronen barzel [Mon, 4 Jun 2012 14:40:47 +0000 (15:40 +0100)]
local Gemfile.lock updates

13 years agono longer need to depend on rake 0.8.7
ronen barzel [Mon, 4 Jun 2012 14:40:21 +0000 (15:40 +0100)]
no longer need to depend on rake 0.8.7

13 years agoREADME update: added travis image, minor cleanups
ronen barzel [Sun, 3 Jun 2012 20:47:30 +0000 (21:47 +0100)]
README update: added travis image, minor cleanups

13 years agoversion bump 0.4.1 v0.4.1
ronen barzel [Wed, 23 May 2012 08:56:30 +0000 (09:56 +0100)]
version bump 0.4.1

13 years agoGemfile.lock updates
ronen barzel [Wed, 23 May 2012 08:56:00 +0000 (09:56 +0100)]
Gemfile.lock updates

13 years agoforce :references nil for t.belongs_to with :polymorphic => true
ronen barzel [Wed, 23 May 2012 08:54:58 +0000 (09:54 +0100)]
force :references nil for t.belongs_to with :polymorphic => true

addresses Issue #41

13 years agoversion bump 3.4.0 v0.4.0
ronen barzel [Wed, 9 May 2012 01:13:04 +0000 (02:13 +0100)]
version bump 3.4.0

13 years agoadd :force option to create_view, and use it in the schema dump
ronen barzel [Tue, 8 May 2012 19:59:16 +0000 (20:59 +0100)]
add :force option to create_view, and use it in the schema dump

13 years agoMerge pull request #56 from betelgeuse/cleanups
ronen barzel [Mon, 7 May 2012 14:08:15 +0000 (07:08 -0700)]
Merge pull request #56 from betelgeuse/cleanups

Cleanups

13 years agoAllow same mysql in Rakefile as in connection
Petteri Räty [Mon, 7 May 2012 13:36:14 +0000 (16:36 +0300)]
Allow same mysql in Rakefile as in connection

Now you can use the same MYSQL_DB_USER environment variable for the
rakefile tasks as can already be used for the specs.

13 years agoTypo fix Adapater to Adapter
Petteri Räty [Mon, 7 May 2012 13:24:59 +0000 (16:24 +0300)]
Typo fix Adapater to Adapter

13 years agoversion bump 0.3.4 v0.3.4
ronen barzel [Wed, 28 Mar 2012 08:18:37 +0000 (09:18 +0100)]
version bump 0.3.4

13 years agoMerge pull request #55 from lukesaunders/master
ronen barzel [Wed, 28 Mar 2012 08:15:55 +0000 (01:15 -0700)]
Merge pull request #55 from lukesaunders/master

Fixed regression causing :default => false to be ignored

13 years ago:default => false should not be ignored but instead end up as DEFAULT 'f' or DEFAULT...
Luke Saunders [Tue, 27 Mar 2012 16:12:49 +0000 (17:12 +0100)]
:default => false should not be ignored but instead end up as DEFAULT 'f' or DEFAULT 0 as is consistent with standard ActiveRecord behaviour

13 years agoversion bump 0.3.3 v0.3.3
ronen barzel [Sat, 24 Mar 2012 07:46:32 +0000 (07:46 +0000)]
version bump 0.3.3

13 years agomysql & mysql2 fixes: handle boolean default. raise ArgumentError for :default ...
ronen barzel [Sat, 24 Mar 2012 07:41:49 +0000 (07:41 +0000)]
mysql & mysql2 fixes: handle boolean default.  raise ArgumentError for :default => :now

13 years agoadd rvm 1.9.3 and gemfile rails-3.2 to travis
ronen barzel [Fri, 23 Mar 2012 06:34:14 +0000 (06:34 +0000)]
add rvm 1.9.3 and gemfile rails-3.2 to travis

13 years agoversion bump 0.3.2 v0.3.2
ronen barzel [Thu, 22 Mar 2012 23:02:06 +0000 (23:02 +0000)]
version bump 0.3.2

13 years agoinclude rake task schema_plus:load as a dependency of db:schema:load
ronen barzel [Thu, 22 Mar 2012 22:54:15 +0000 (22:54 +0000)]
include rake task schema_plus:load as a dependency of db:schema:load

13 years agoREADME typo fix
ronen barzel [Wed, 21 Mar 2012 22:58:15 +0000 (22:58 +0000)]
README typo fix

13 years agoversion bump v0.3.1
ronen barzel [Wed, 21 Mar 2012 22:10:10 +0000 (22:10 +0000)]
version bump

13 years agominor README tweaks
ronen barzel [Wed, 21 Mar 2012 22:09:51 +0000 (22:09 +0000)]
minor README tweaks

13 years agowhitespace independence in spec test. (platform-specificity?)
ronen barzel [Wed, 21 Mar 2012 22:07:40 +0000 (22:07 +0000)]
whitespace independence in spec test.  (platform-specificity?)

13 years agofix recently-introduced postgresql default => NULL::character varying bug
ronen barzel [Wed, 21 Mar 2012 20:07:55 +0000 (20:07 +0000)]
fix recently-introduced postgresql default => NULL::character varying bug

13 years agoversion bump 0.3.0 v0.3.0
ronen barzel [Mon, 19 Mar 2012 11:43:12 +0000 (11:43 +0000)]
version bump 0.3.0

13 years agoMerge pull request #51 from lukesaunders/master
ronen barzel [Mon, 19 Mar 2012 11:41:25 +0000 (04:41 -0700)]
Merge pull request #51 from lukesaunders/master

Add support for allowing column SQL expression defaults in the database

13 years agoGemfile.*.lock
ronen barzel [Mon, 19 Mar 2012 11:24:31 +0000 (11:24 +0000)]
Gemfile.*.lock

13 years agoproperly lock Gemfiles to minor rails version
ronen barzel [Mon, 19 Mar 2012 11:24:18 +0000 (11:24 +0000)]
properly lock Gemfiles to minor rails version

13 years agotest ruby 1.9.3
ronen barzel [Mon, 19 Mar 2012 11:12:24 +0000 (11:12 +0000)]
test ruby 1.9.3

13 years agomore robust testing that schema loading overrides auto creation to false
ronen barzel [Mon, 19 Mar 2012 11:10:39 +0000 (11:10 +0000)]
more robust testing that schema loading overrides auto creation to false

13 years agofix views spec not to use unnamed class, since rails wasn't doing well with that
ronen barzel [Mon, 19 Mar 2012 10:54:38 +0000 (10:54 +0000)]
fix views spec not to use unnamed class, since rails wasn't doing well with that

13 years agotest rails version via VERSION::STRING
ronen barzel [Mon, 19 Mar 2012 10:54:00 +0000 (10:54 +0000)]
test rails version via VERSION::STRING

13 years agoadd some unimplemented specs
ronen barzel [Mon, 19 Mar 2012 10:53:35 +0000 (10:53 +0000)]
add some unimplemented specs

13 years agouse released rails 3.2
ronen barzel [Mon, 19 Mar 2012 10:52:43 +0000 (10:52 +0000)]
use released rails 3.2

13 years agofix runspecs to correctly report errors
ronen barzel [Mon, 19 Mar 2012 10:52:02 +0000 (10:52 +0000)]
fix runspecs to correctly report errors

(check output for errors, rather than relying on return code)

13 years agoadded support for :default => :now, :default => { :expr => 'NOW()' }, :default =...
Luke Saunders [Sat, 28 Jan 2012 13:17:34 +0000 (13:17 +0000)]
added support for :default => :now, :default => { :expr => 'NOW()' }, :default => { :value => 'A STRING' }

13 years agoadd spec to verify change column removing foreign key constraint
ronen barzel [Tue, 24 Jan 2012 22:05:45 +0000 (22:05 +0000)]
add spec to verify change column removing foreign key constraint

13 years agoversion bump 0.2.1 v0.2.1
ronen barzel [Fri, 6 Jan 2012 12:00:57 +0000 (12:00 +0000)]
version bump 0.2.1

13 years agoadd comment explaining inconsistency of arity.
ronen barzel [Fri, 6 Jan 2012 11:51:00 +0000 (11:51 +0000)]
add comment explaining inconsistency of arity.

13 years agoMerge remote-tracking branch 'origin/master'
ronen barzel [Fri, 6 Jan 2012 11:56:51 +0000 (11:56 +0000)]
Merge remote-tracking branch 'origin/master'

13 years agogem updates
ronen barzel [Fri, 6 Jan 2012 11:49:38 +0000 (11:49 +0000)]
gem updates

13 years agostart testing against rails 3.2 (3.2.0.rc2). refactored runspecs to be able to filte...
ronen barzel [Fri, 6 Jan 2012 11:49:05 +0000 (11:49 +0000)]
start testing against rails 3.2 (3.2.0.rc2).  refactored runspecs to be able to filter combos since rails 3.2 doesn't support ruby 1.8.7.

13 years agoMerge pull request #47 from antage/fix_drop_table_in_rails-3.2
ronen barzel [Fri, 6 Jan 2012 10:58:09 +0000 (02:58 -0800)]
Merge pull request #47 from antage/fix_drop_table_in_rails-3.2

activerecord >= 3.2 #drop_table gets only single argument

13 years agoactiverecord >= 3.2 #drop_table gets only single argument
Anton Ageev [Fri, 6 Jan 2012 02:36:13 +0000 (06:36 +0400)]
activerecord >= 3.2 #drop_table gets only single argument

13 years agotypo in comment
ronen barzel [Sat, 10 Dec 2011 23:17:39 +0000 (23:17 +0000)]
typo in comment

13 years agolog a warning when suppressing add_index. also update doc to point out the prior... 46_index_collision
ronen barzel [Sun, 4 Dec 2011 22:00:11 +0000 (22:00 +0000)]
log a warning when suppressing add_index.  also update doc to point out the prior behaviour depended on rails & adapter versions.

13 years agoModify add_index so that it silently ignores requests to add an index that already...
ronen barzel [Sun, 13 Nov 2011 02:01:54 +0000 (02:01 +0000)]
Modify add_index so that it silently ignores requests to add an index that already exists with all the same options.  This avoids collisions between SchemaPlus's auto index behaviour and legacy explicit add_index statements.

13 years agobumped version v0.2.0
Michał Łomnicki [Fri, 21 Oct 2011 23:55:34 +0000 (01:55 +0200)]
bumped version

13 years agoreplaced rvm exec with rvm do to fix deprecation warning
Michał Łomnicki [Fri, 21 Oct 2011 23:42:19 +0000 (01:42 +0200)]
replaced rvm exec with rvm do to fix deprecation warning

13 years agoheroku deployment fails when non-ascii characters are included in gemspec. (thx ...
Michał Łomnicki [Fri, 21 Oct 2011 23:39:06 +0000 (01:39 +0200)]
heroku deployment fails when non-ascii characters are included in gemspec. (thx @rasmusrn)

13 years agoMerge branch '44_rake_tasks' of github.com:lomba/schema_plus into 44_rake_tasks
Michał Łomnicki [Sat, 15 Oct 2011 11:11:05 +0000 (13:11 +0200)]
Merge branch '44_rake_tasks' of github.com:lomba/schema_plus into 44_rake_tasks

13 years agosmall README.rdoc fixes
ronen barzel [Thu, 13 Oct 2011 21:27:35 +0000 (22:27 +0100)]
small README.rdoc fixes

13 years agoDocument the config behavior within ActiveRecord::Schema.define
ronen barzel [Thu, 13 Oct 2011 21:25:56 +0000 (22:25 +0100)]
Document the config behavior within ActiveRecord::Schema.define

13 years agoMerge branch 'schema_defining' into 44_rake_tasks 44_rake_tasks
Michał Łomnicki [Wed, 12 Oct 2011 13:43:26 +0000 (15:43 +0200)]
Merge branch 'schema_defining' into 44_rake_tasks

13 years agoforce rake db:schema:dump to load schema plus enhancements
Michał Łomnicki [Wed, 12 Oct 2011 13:33:21 +0000 (15:33 +0200)]
force rake db:schema:dump to load schema plus enhancements

13 years agoSchema#define now overrides the config auto-create values to be false, rather than... schema_defining
ronen barzel [Sat, 8 Oct 2011 12:24:02 +0000 (13:24 +0100)]
Schema#define now overrides the config auto-create values to be false, rather than setting a flag which disables config entirely.

This cleans up the auto create logic, and also allows users to turn auto-create back on within a schema definition if they so desire.  (Addresses Issue #43)

13 years agobug fix: be sure not to re-include the IndexDefinition module into Mysql2's IndexDefi...
ronen barzel [Fri, 7 Oct 2011 19:13:42 +0000 (20:13 +0100)]
bug fix: be sure not to re-include the IndexDefinition module into Mysql2's IndexDefinition.  (Issue #42)

This would happen if a mysql2 connection is reinitialized, which happens with some rake tasks.  The re-inclusion caused  alias_method_chain to be run twice, causing an infinite alias chain recursion.

13 years agoadded spec for testing re-connection (fails for mysql2)
ronen barzel [Fri, 7 Oct 2011 19:56:47 +0000 (20:56 +0100)]
added spec for testing re-connection (fails for mysql2)

13 years ago./runspecs without arguments now defaults to all ruby versions.
ronen barzel [Fri, 7 Oct 2011 19:44:46 +0000 (20:44 +0100)]
./runspecs without arguments now defaults to all ruby versions.

in particular, ./runspecs --install now therefore defaults to installing for all ruby versions, which it wasn't doing before, which i found confusing.

(we have --quick already for fast runs, and the ability to restrict to a specific ruby version.)

13 years agoview_spec fix: make sure to clean out any previous views, or they'll mess up the...
ronen barzel [Fri, 7 Oct 2011 19:38:58 +0000 (20:38 +0100)]
view_spec fix: make sure to clean out any previous views, or they'll mess up the results

13 years agominor schema_dumper cleanup: get rid of vestigial require 'models/post'
ronen barzel [Fri, 7 Oct 2011 18:51:55 +0000 (19:51 +0100)]
minor schema_dumper cleanup: get rid of vestigial require 'models/post'

13 years agofix default params
Michał Łomnicki [Fri, 7 Oct 2011 01:08:04 +0000 (03:08 +0200)]
fix default params

13 years agoprovide consistent interface for ColumnOptionsHandler
Michał Łomnicki [Thu, 6 Oct 2011 23:36:31 +0000 (01:36 +0200)]
provide consistent interface for ColumnOptionsHandler

we assume add_index and add_foreign_key exist and have consitent
signature.

13 years agoMerge branch 'column_options_handler' of github.com:lomba/schema_plus into column_opt...
Michał Łomnicki [Thu, 6 Oct 2011 22:39:41 +0000 (00:39 +0200)]
Merge branch 'column_options_handler' of github.com:lomba/schema_plus into column_options_handler

13 years agoschema dumper now checks for foreign key constraint dependency cycles and handles...
ronen barzel [Sun, 2 Oct 2011 23:06:11 +0000 (00:06 +0100)]
schema dumper now checks for foreign key constraint dependency cycles and handles them by delaying dumping backwards-referencing foreign key constraints after the table they reference.

(Fix for issue #40)

13 years agoschema_dumper_spec: add examples to test constraint order and also handling of cyclic...
ronen barzel [Sun, 2 Oct 2011 11:45:17 +0000 (12:45 +0100)]
schema_dumper_spec: add examples to test constraint order and also handling of cyclic constraints (currently fails)

13 years agomore schema_dumper_spec cleanup
ronen barzel [Sun, 2 Oct 2011 07:52:58 +0000 (08:52 +0100)]
more schema_dumper_spec cleanup

i hate to remove tests, but this seems completely pointless, and so confusing: checking that it doesn't dump ":index" is odd since there's no code that would dump it in any circumstance.

13 years agoclean up schema_dumper_spec
ronen barzel [Sun, 2 Oct 2011 07:46:47 +0000 (08:46 +0100)]
clean up schema_dumper_spec

put schema inline rather than load from a separate file, so that it can be seen and tweaked without affecting other specs.  merge the two sections that were separate only for historical reasons.

13 years agoeliminate duplicate code: create ColumnOptionsHandler module that's included by add_c...
ronen barzel [Sat, 1 Oct 2011 06:37:45 +0000 (07:37 +0100)]
eliminate duplicate code: create ColumnOptionsHandler module that's included by add_column and table_definition.  it handles the logic for creating an index and/or foreign key based on options and configuration and operation mode.

this also eliminates the unsightly cross-module calling of get_references, since it's now bundled in ColumnOptionsHandler.  and, since get_references is an internal method and all its functionality is tested in other specs, got rid of spec/references_spec.rb

13 years agoDon't create foreign key if :polymorphic => true
ronen barzel [Sat, 1 Oct 2011 05:13:43 +0000 (06:13 +0100)]
Don't create foreign key if :polymorphic => true

Closes #41

13 years agoadd failing spec example for t.references ... :polymorphic => true
ronen barzel [Sat, 1 Oct 2011 05:45:39 +0000 (06:45 +0100)]
add failing spec example for t.references ... :polymorphic => true

13 years agoforce auto_create and auto_index v0.1.3
Michał Łomnicki [Wed, 28 Sep 2011 02:23:32 +0000 (04:23 +0200)]
force auto_create and auto_index

13 years agoversion bumped to 0.1.3
Michał Łomnicki [Wed, 28 Sep 2011 02:12:20 +0000 (04:12 +0200)]
version bumped to 0.1.3

13 years agoMerge remote branch 'florent2/patch-1'
Michał Łomnicki [Wed, 28 Sep 2011 02:08:40 +0000 (04:08 +0200)]
Merge remote branch 'florent2/patch-1'

13 years agoMerge branch 'faster_columns'
Michał Łomnicki [Wed, 28 Sep 2011 02:08:05 +0000 (04:08 +0200)]
Merge branch 'faster_columns'

13 years agoupdated gemfiles
Michał Łomnicki [Wed, 28 Sep 2011 02:07:06 +0000 (04:07 +0200)]
updated gemfiles

13 years agofixed rails-3.1 migrations compatibility #38
Michał Łomnicki [Wed, 28 Sep 2011 02:05:10 +0000 (04:05 +0200)]
fixed rails-3.1 migrations compatibility #38

13 years agoFix typos
Florent Guilleux [Mon, 19 Sep 2011 19:58:25 +0000 (14:58 -0500)]
Fix typos

13 years agochange columns to be lazy about assigning index. don't want to pay the price for...
ronen barzel [Sun, 21 Aug 2011 14:14:27 +0000 (07:14 -0700)]
change columns to be lazy about assigning index.  don't want to pay the price for looking up indexes unless somebody asks for an attribute that depends on the index.

13 years agotypo fixed
Michał Łomnicki [Wed, 17 Aug 2011 15:10:18 +0000 (17:10 +0200)]
typo fixed

13 years agodon't gitignore gemfiles/Gemfile*.lock -- lets us know which dependency set we're...
ronen barzel [Sun, 14 Aug 2011 20:54:17 +0000 (13:54 -0700)]
don't gitignore gemfiles/Gemfile*.lock -- lets us know which dependency set we're using at any moment for development.

still not checking in a top-level Gemfie.lock, so non-development use isn't locked in.

13 years agoswitch run specs to using standard update & install paradigm, and update README.
ronen barzel [Sun, 14 Aug 2011 20:52:44 +0000 (13:52 -0700)]
switch run specs to using standard update & install paradigm, and update README.

13 years agotest and document use of t.references
ronen barzel [Sun, 14 Aug 2011 18:20:11 +0000 (11:20 -0700)]
test and document use of t.references

13 years ago./runspecs improvements: default is now quicker. added --full, -n, and error reporting.
ronen barzel [Thu, 4 Aug 2011 13:59:43 +0000 (06:59 -0700)]
./runspecs improvements: default is now quicker.  added --full, -n, and error reporting.

also removed vestigial PROJECT variable

13 years agoversion bump 0.1.2 v0.1.2
ronen barzel [Thu, 4 Aug 2011 05:52:44 +0000 (22:52 -0700)]
version bump 0.1.2

13 years agoadd ronen to travis
ronen barzel [Thu, 4 Aug 2011 05:52:32 +0000 (22:52 -0700)]
add ronen to travis

13 years agopass BUNDLE_GEMFILE at the beginning
Michał Łomnicki [Wed, 3 Aug 2011 22:43:05 +0000 (00:43 +0200)]
pass BUNDLE_GEMFILE at the beginning

13 years agorun travis-ci after push to any branch
Michał Łomnicki [Wed, 3 Aug 2011 22:23:19 +0000 (00:23 +0200)]
run travis-ci after push to any branch

13 years agoMerge branch 'travis'
Michał Łomnicki [Wed, 3 Aug 2011 22:06:29 +0000 (00:06 +0200)]
Merge branch 'travis'

Conflicts:
.travis.yml

13 years agouse psql -c instead of psql -e
Michał Łomnicki [Wed, 3 Aug 2011 21:41:02 +0000 (23:41 +0200)]
use psql -c instead of psql -e

13 years agotypo fixed
Michał Łomnicki [Wed, 3 Aug 2011 21:38:00 +0000 (23:38 +0200)]
typo fixed

13 years agodon't use rake task to create dbs on travis
Michał Łomnicki [Wed, 3 Aug 2011 21:34:44 +0000 (23:34 +0200)]
don't use rake task to create dbs on travis

13 years agodon't use rake task to create dbs on travis
Michał Łomnicki [Wed, 3 Aug 2011 21:34:44 +0000 (23:34 +0200)]
don't use rake task to create dbs on travis

13 years agoreverted b2df15d2f3ab37d9cf8a994b29b2adb0fa3ca220 on Rakefile
Michał Łomnicki [Wed, 3 Aug 2011 21:26:35 +0000 (23:26 +0200)]
reverted b2df15d2f3ab37d9cf8a994b29b2adb0fa3ca220 on Rakefile

13 years agoforce postgresql and mysql user when running on travis
Michał Łomnicki [Wed, 3 Aug 2011 20:00:01 +0000 (22:00 +0200)]
force postgresql and mysql user when running on travis

13 years agoforce postgresql and mysql user when running on travis
Michał Łomnicki [Wed, 3 Aug 2011 20:00:01 +0000 (22:00 +0200)]
force postgresql and mysql user when running on travis

13 years agodon't force /tmp/sock. use default one
Michał Łomnicki [Wed, 3 Aug 2011 19:59:45 +0000 (21:59 +0200)]
don't force /tmp/sock. use default one