Skip to content

Change default key from id to another column #336

@rasadeghnasab

Description

@rasadeghnasab

I have a table which has these columns:

id, user_id, parent_id, sport_id

I want to create children using user_id column instead of id.
for example:

id      user_id      parent_id       sport_id
1	 20		  null		2
2	 25		  20		2	# user#20 is user#25 parent.
3	 28		  25		2	# user#25 is user#28 parent.
4	 29		  20		2	# user#20 is user#29 parent.

please tell me what should I do?

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