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

Added relation between accounts has_one customer has_many documents #35

Closed
wants to merge 1 commit into from
Closed

Added relation between accounts has_one customer has_many documents #35

wants to merge 1 commit into from

Conversation

amir-budaychiev
Copy link

Added relation between accounts has_one customer has_many documents

Copy link
Contributor

@mod mod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I am very picky with my tables,
otherwise it's a good start, we should look into factories at this stage and test a bit the model

t.string :address
t.string :postcode
t.string :city
t.string :country
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you set account_id at the beginning for the table

dob means (date of birth) can you move it back below last_name.


t.date :doc_expire

t.references :customer, null: false, index: true, foreign_key: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always put my foreign keys at the beginning of the table, it actually helps natural join in SQL

@mod mod closed this Jan 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants