mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 07:36:14 -05:00
[PM-5519] [PM-5526] [PM-5624] [PM-5600] Tweak EF settings for MySQL grant auto-increment (#3662)
* Tweak EF settings for grant auto-increment * Go back to zero generated default as that doesn't matter * Explicit value generation callout * Go with custom SQL for direct automatic increment * Proper column creation * Lint
This commit is contained in:
@ -12,6 +12,10 @@ public class GrantEntityTypeConfiguration : IEntityTypeConfiguration<Grant>
|
||||
.HasKey(s => s.Id)
|
||||
.IsClustered();
|
||||
|
||||
builder
|
||||
.Property(s => s.Id)
|
||||
.UseIdentityColumn();
|
||||
|
||||
builder
|
||||
.HasIndex(s => s.Key)
|
||||
.IsUnique(true);
|
||||
|
@ -1,6 +1,6 @@
|
||||
CREATE TABLE [dbo].[Grant]
|
||||
(
|
||||
[Id] INT NOT NULL IDENTITY,
|
||||
[Id] INT NOT NULL IDENTITY(1,1),
|
||||
[Key] NVARCHAR (200) NOT NULL,
|
||||
[Type] NVARCHAR (50) NOT NULL,
|
||||
[SubjectId] NVARCHAR (200) NULL,
|
||||
|
Reference in New Issue
Block a user