Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Note to myself on UUID usage #403

Open
jamo opened this issue Sep 9, 2016 · 0 comments
Open

Note to myself on UUID usage #403

jamo opened this issue Sep 9, 2016 · 0 comments

Comments

@jamo
Copy link
Member

jamo commented Sep 9, 2016

Found this neat way for setting id as uuid, and this seems like the only place where I can be sure to find it 😂

So when creating new tables, let's consider using uuids

create_table "table_name", id: :uuid, default: "gen_random_uuid()", force: :cascade do |t|
    t.uuid     "user_id"
    t.jsonb    "settings",       default: {}, null: false
    t.datetime "created_at",                  null: false
    t.datetime "updated_at",                  null: false
  end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant