Some important things to know when working with Active records and SQL Server :
1. The ID field has Integer as default data type
2. The ID field is automatically created with an Identity specification with the following values :
- Identity Increment 1
- Identity Seed 1
3. The created_at field does not get a default value (eg. Getdate() would have been nice !). Thus if you don't rely exclusively on the active record to populate this field, it is recommended to add this default value.
4. The updated_at field does get the same value as created_at first. It is then updated while created_at remains unchanged.
Welcome, Prashanth!
-
Last March, I shared that we were starting to look for a new CEO for Stack
Overflow. We were looking for that rare combination of someone who… Read
more "W...
5 years ago
No comments:
Post a Comment