# File lib/dm-migrations/sql/postgres.rb, line 39 39: def change_column_type_statement(name, column) 40: "ALTER TABLE #{quote_name(name)} ALTER COLUMN #{column.to_sql}" 41: end
# File lib/dm-migrations/sql/postgres.rb, line 22 22: def property_schema_statement(connection, schema) 23: if supports_serial? && schema[:serial] 24: statement = "#{schema[:quote_column_name]} SERIAL PRIMARY KEY" 25: else 26: statement = super 27: if schema.has_key?(:sequence_name) 28: statement << " DEFAULT nextval('#{schema[:sequence_name]}') NOT NULL" 29: end 30: statement 31: end 32: statement 33: end
# File lib/dm-migrations/sql/postgres.rb, line 12 12: def recreate_database 13: execute 'DROP SCHEMA IF EXISTS test CASCADE' 14: execute 'CREATE SCHEMA test' 15: execute 'SET search_path TO test' 16: end
# File lib/dm-migrations/sql/postgres.rb, line 4 4: def supports_schema_transactions? 5: true 6: end
# File lib/dm-migrations/sql/postgres.rb, line 18 18: def supports_serial? 19: true 20: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.