Skip to content

schema.rb not being generated correctly after migration #81

@cameronbourgeois

Description

@cameronbourgeois

My migrations are not creating the correct entires in my schema.rb file.

See my example migration:

create_table :my_table, { id: false } do |t|
      t.uuid :id, primary_key: true

      t.timestamps
end

And this generates an entry in my schema.rb, without my uuid primary key

create_table "my_table", force: :cascade do |t|
    t.datetime "created_at"
    t.datetime "updated_at"
  end

I then need to manually change my shema.rb to the following in order for it to work correctly:

create_table "my_table", id: false, force: :cascade do |t|
    t.uuid        "id",                limit: 16, primary_key: true
    t.datetime "created_at"
    t.datetime "updated_at"
end

Is there something existing I can enter into my migrations to get this to work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions