Archive for the 'postgresql' Category

04
Jul
12

creating a postgresql schema from inside a rails migration

If you ever need to create a schema from inside a migration, write this:


def up
  execute "CREATE SCHEMA some_schema"
end

def down
  execute "DROP SCHEMA some_schema"
end



Blog Stats

  • 218,505 hits