lib/torque/postgresql/adapter/schema_statements.rb in torque-postgresql-1.1.8 vs lib/torque/postgresql/adapter/schema_statements.rb in torque-postgresql-2.0.0
- old
+ new
@@ -71,26 +71,16 @@
select_values("SELECT unnest(enum_range(NULL::#{name}))", 'SCHEMA')
end
# Rewrite the method that creates tables to easily accept extra options
def create_table(table_name, **options, &block)
- td = create_table_definition(table_name, **options)
- options[:id] = false if td.inherited_id?
- options[:temporary] = td
+ options[:id] = false if options[:inherits].present? &&
+ options[:primary_key].blank? && options[:id].blank?
super table_name, **options, &block
end
private
-
- # This waits for the second call to really return the table definition
- def create_table_definition(*args, **options) # :nodoc:
- if !args.second.kind_of?(TableDefinition)
- TableDefinition.new(*args, **options)
- else
- args.second
- end
- end
def quote_enum_values(name, values, options)
prefix = options[:prefix]
prefix = name if prefix === true