Skip to content

Conversation

@alexanderreiff
Copy link
Contributor

When generating models from existing tables, set timestamp constants (CREATED_AT, UPDATED_AT) fields using the model generator. Timestamp field names are configured by config file keys.

Also, adds datetime/date fields to casts array in model.

@phillipmadsen
Copy link
Contributor

Great idea!

This excludes primary key and timestamp columns
@alexanderreiff alexanderreiff force-pushed the feature/existing-timestamps branch from 8e664ba to 5fe9b25 Compare February 24, 2016 20:19
@alexanderreiff alexanderreiff changed the title Configure model timestamps for existing fields Configure model timestamps and enable optional searchability for existing fields Feb 24, 2016
@alexanderreiff alexanderreiff changed the title Configure model timestamps and enable optional searchability for existing fields Configure model timestamps and enable optional search-ability for existing fields Feb 24, 2016
@alexanderreiff
Copy link
Contributor Author

Also added functionality to enable all existing non-PK or timestamp fields in a table to be searchable via repository. This is enabled via the config file and is disabled by default

mitulgolakiya added a commit that referenced this pull request Mar 7, 2016
Configure model timestamps and enable optional search-ability for existing fields
@mitulgolakiya mitulgolakiya merged commit ea7971b into InfyOmLabs:master Mar 7, 2016
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

Successfully merging this pull request may close these issues.

3 participants