testmycode / testmycode/tmc-server
Note to myself on UUID usage
Open
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 51
- Forks
- 42
- Avg merge
- 1h 27m
- Merged PRs (30d)
- 1
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Review the proposed create_table pattern and the project's existing database migrations to determine whether UUID defaults should become a project convention; done would require an agreed scope and an identified place to apply it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, rails, ruby
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100