Any way to set Indentity seed through Migrations file?

Topics: Writing modules
May 28, 2013 at 1:36 PM
As the title suggests..

I would like to set the identity seed of the primary key of a table through the migrations file, is this possible?

If not, is there any way to do this with Orchard? I'd rather not have to resort to a SQL script.

May 28, 2013 at 11:20 PM
May 29, 2013 at 8:55 AM
I have an Order table where I use the Id of the Order table as the public facing Order number. The client would like the order numbers to start at 1000, rather than 1. So I thought I could seed the Id.
May 31, 2013 at 6:16 AM
Ids should never be exposed to your users. They are technical, internal implementation details. I would have a separate "friendly id" column instead.
Jun 18, 2013 at 1:23 PM
Yes, your right, thanks
Jun 18, 2013 at 2:19 PM
Not to mention that exposing database Ids directly can be a security hole, if not handled correctly (checking necessary permissions etc.)