bibendi / activerecord-postgres_enum

Integrate PostgreSQL's enum data type into ActiveRecord's schema and migrations.
MIT License
361 stars 24 forks source link

Make dump code style consistent with Rails #7

Closed palkan closed 5 years ago

palkan commented 5 years ago

Before:

ActiveRecord::Schema.define(version: 2019_01_14_215416) do
  create_enum('visibility_type', ["private", "public"])

  create_table "cities", id: :serial, force: :cascade do |t|
    t.string "name", null: false
    t.enum "visibility", default: "public", null: false, enum_name: "visibility_type"
  end
end

After:

ActiveRecord::Schema.define(version: 2019_01_14_215416) do
  create_enum :visibility_type, ["private", "public"]

  create_table "cities", id: :serial, force: :cascade do |t|
    t.string "name", null: false
    t.enum "visibility", default: "public", null: false, enum_name: "visibility_type"
  end
end