Move `SchemaCreation` to its own file instead of `AbstractAdapter`. #12832

Merged
merged 1 commit into from Nov 14, 2013

Conversation

Projects
None yet
4 participants
Member

vipulnsward commented Nov 10, 2013

Move SchemaCreation to its own file instead of AbstractAdapter.

Contributor

egilburg commented Nov 10, 2013

call it SchemaCreator to be more similar to 'dumper' etc?

(if its out scope for PR, no prob)

@rafaelfranca rafaelfranca commented on an outdated diff Nov 11, 2013

...ecord/connection_adapters/abstract/schema_creation.rb
+ end
+
+ def accept(o)
+ m = @cache[o.class] ||= "visit_#{o.class.name.split('::').last}"
+ send m, o
+ end
+
+ def visit_AddColumn(o)
+ sql_type = type_to_sql(o.type.to_sym, o.limit, o.precision, o.scale)
+ sql = "ADD #{quote_column_name(o.name)} #{sql_type}"
+ add_column_options!(sql, column_options(o))
+ end
+
+ private
+
+ def visit_AlterTable(o)
@rafaelfranca

rafaelfranca Nov 11, 2013

Owner

Could you indent the private methods?

Owner

rafaelfranca commented Nov 11, 2013

👍 For SchemaCreator

Member

vipulnsward commented Nov 11, 2013

@rafaelfranca updated and renamed.

Owner

rafaelfranca commented Nov 11, 2013

Sorry, now that Is saw the changes I think it will break the others adapters code. Could you rename back?

Member

vipulnsward commented Nov 12, 2013

@rafaelfranca changed back to original state.

Owner

senny commented Nov 14, 2013

@vipulnsward looks good.

senny merged commit c576e24 into rails:master Nov 14, 2013

1 check failed

default The Travis CI build failed
Details
Member

vipulnsward commented Nov 14, 2013

Thanks @senny, @rafaelfranca .

yahonda referenced this pull request in rsim/oracle-enhanced Dec 2, 2013

Merged

Move `SchemaCreation` to its own file #381

vipulnsward deleted the vipulnsward:move_schema_creation branch Feb 22, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment