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

re-standardize db column names for created/updated/deleted #15

Open
richjoslin opened this issue Feb 15, 2012 · 5 comments
Open

re-standardize db column names for created/updated/deleted #15

richjoslin opened this issue Feb 15, 2012 · 5 comments

Comments

@richjoslin
Copy link
Owner

There are columns in the database named created_on and last_created_on (and in other places, just created).

@richjoslin
Copy link
Owner Author

We've decided on the suffix _on.

These will be the reserved column names that are also required on all db tables:

  • id
  • sort_order
  • created_on
  • modified_on
  • deleted_on

@jaybill
Copy link
Collaborator

jaybill commented Feb 18, 2012

We might not want to require them, but just handle them in the abstract model class if you don't expressly set them. There's plenty of cases (lookup tables, for example) where the data doesn't change or that I don't ever care when it was created.

@jaybill
Copy link
Collaborator

jaybill commented Feb 18, 2012

I'm going to add this to the abstract model class as described above. I'm also going to take the modified_on business out of the crudifier templates.

@jaybill
Copy link
Collaborator

jaybill commented Feb 18, 2012

So we use "updated_on" in a lot of places, should we just standardize on "modified_on" instead? I'm going to check for both in the model, just in case.

jaybill pushed a commit that referenced this issue Feb 18, 2012
@jaybill
Copy link
Collaborator

jaybill commented Feb 18, 2012

I've added the checks for modified_on, created_on and for legacy purposes, updated_on. I did not do "deleted_on" because we need to talk about soft deletes. I'm also not sure about sort order. I'll leave this ticket open for to discuss.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants