On Sat, Jan 30, 2021 at 4:34 PM Michael Davis <[email protected]>
wrote:
> Looks like support has been add for :identity to postgres. Is it
> supported in Sql Server? The schema method returns :auto_increment=>true
> for an existing sql server table with an identity column but when I call
> create_table and set :identity in the options or call the primary_key
> method (which works for Sqlite and MS Acess), I get a clustered index but
> no identity on the newly created table.
Sequel uses identity for primary keys by default on Microsoft SQL Server:
$ bin/sequel -E mock://mssql
Your database is stored in DB...
irb(main):001:0> DB.create_table(:a){primary_key :id}
I, [2021-01-30T21:31:29.365817 #6223] INFO -- : (0.000004s) CREATE TABLE
[A] ([ID] integer NOT NULL PRIMARY KEY IDENTITY(1,1)
Thanks,
Jeremy
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sequel-talk/CADGZSScm5gJZ%2BiWoqrm%2Bu9A%3Divv2L0tY9PNjTdb9uxMt6zh8Vw%40mail.gmail.com.