Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- USE [Omni_TEMP]
- GO
- /****** Object: Table [dbo].[AL_ShipGirls] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[AL_ShipGirls](
- [ShipGirlId] [int] IDENTITY(1,1) NOT NULL,
- [WikiId] [int] NOT NULL,
- [CharacterId] [int] NULL,
- [AniCharid] [bigint] NULL,
- [ShipGirlName] [nvarchar](max) NOT NULL,
- [AntiAir] [int] NOT NULL,
- [Aviation] [int] NOT NULL,
- [Evasion] [int] NOT NULL,
- [Faction] [nvarchar](max) NOT NULL,
- [Firepower] [int] NOT NULL,
- [Health] [int] NOT NULL,
- [GameRarity] [nvarchar](max) NOT NULL,
- [Torpedo] [int] NOT NULL,
- [Type] [nvarchar](max) NOT NULL,
- CONSTRAINT [PK_AL_ShipGirls] PRIMARY KEY CLUSTERED
- (
- [ShipGirlId] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY],
- CONSTRAINT [IX_AL_ShipGirls] UNIQUE NONCLUSTERED
- (
- [WikiId] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
- ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[APIAccess] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[APIAccess](
- [Id] [int] IDENTITY(1,1) NOT NULL,
- [UserId] [int] NOT NULL,
- [IsAdmin] [bit] NOT NULL,
- [IsSir] [bit] NOT NULL,
- [KeyHash] [nvarchar](max) NOT NULL,
- CONSTRAINT [PK_APIAccess] PRIMARY KEY CLUSTERED
- (
- [Id] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
- ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[Buddies] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[Buddies](
- [StatId] [int] NOT NULL,
- [BuddyStatId] [int] NOT NULL,
- [IsNegative] [bit] NOT NULL
- ) ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[Characters] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[Characters](
- [Id] [int] IDENTITY(1,1) NOT NULL,
- [Name] [nvarchar](max) NOT NULL,
- [ImageUrl] [nvarchar](max) NOT NULL,
- [SourceId] [int] NOT NULL,
- [AniCharId] [bigint] NOT NULL,
- [DibbedById] [int] NOT NULL,
- [IsCustom] [bit] NOT NULL,
- [IsLocked] [bit] NOT NULL,
- [IsNoWeekly] [bit] NULL,
- CONSTRAINT [PK_Characters] PRIMARY KEY CLUSTERED
- (
- [Id] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
- ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[CharacterTags] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[CharacterTags](
- [CharacterId] [int] NOT NULL,
- [TagId] [bigint] NOT NULL
- ) ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[DotD] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[DotD](
- [Id] [int] IDENTITY(1,1) NOT NULL,
- [CharacterId] [int] NOT NULL,
- [Date] [date] NOT NULL,
- [UserId] [int] NOT NULL,
- CONSTRAINT [PK_DotD] PRIMARY KEY CLUSTERED
- (
- [Id] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
- ) ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[ElementMatchups] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[ElementMatchups](
- [AttackingId] [int] NOT NULL,
- [DefendingId] [int] NOT NULL,
- [NetEffect] [int] NOT NULL,
- [IsImmunity] [bit] NOT NULL
- ) ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[Elements] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[Elements](
- [ElementId] [int] IDENTITY(1,1) NOT NULL,
- [ElementName] [nvarchar](max) NOT NULL,
- [IsDefault] [bit] NOT NULL,
- CONSTRAINT [PK_Elements] PRIMARY KEY CLUSTERED
- (
- [ElementId] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
- ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[FactionMembership] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[FactionMembership](
- [CharacterId] [int] NOT NULL,
- [FactionId] [int] NOT NULL
- ) ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[Factions] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[Factions](
- [FactionId] [int] IDENTITY(1,1) NOT NULL,
- [FactionName] [nvarchar](max) NOT NULL,
- [M_HeadId] [int] NOT NULL,
- [PrimaryElementId] [int] NOT NULL,
- [F_HeadId] [int] NOT NULL,
- [SecondaryElementId] [int] NULL,
- CONSTRAINT [PK_Factions] PRIMARY KEY CLUSTERED
- (
- [FactionId] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
- ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[FoxDay] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[FoxDay](
- [DotDId] [int] NOT NULL,
- [OccurredOn] [date] NOT NULL
- ) ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[Franchises] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[Franchises](
- [FranchiseId] [int] IDENTITY(1,1) NOT NULL,
- [FranchiseName] [nvarchar](max) NOT NULL,
- CONSTRAINT [PK_Franchises] PRIMARY KEY CLUSTERED
- (
- [FranchiseId] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
- ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[Ideas] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[Ideas](
- [Id] [int] IDENTITY(1,1) NOT NULL,
- [Name] [nvarchar](max) NOT NULL,
- [CreatedById] [int] NOT NULL,
- [Text] [nvarchar](max) NOT NULL,
- [IsCompleted] [bit] NOT NULL,
- [CreatedOn] [datetime] NOT NULL,
- [ModifiedOn] [datetime] NOT NULL,
- [Priority] [int] NOT NULL,
- CONSTRAINT [PK_Ideas] PRIMARY KEY CLUSTERED
- (
- [Id] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
- ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[ImageRelationships] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[ImageRelationships](
- [ImageId] [int] NOT NULL,
- [CharacterId] [int] NOT NULL,
- [ImageType] [int] NOT NULL
- ) ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[Images] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[Images](
- [Id] [int] IDENTITY(1,1) NOT NULL,
- [Slug] [nvarchar](max) NOT NULL,
- [UploadedById] [int] NOT NULL,
- [UploadedUtc] [datetime] NOT NULL,
- CONSTRAINT [PK_Images] PRIMARY KEY CLUSTERED
- (
- [Id] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
- ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[ImageTags] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[ImageTags](
- [ImageId] [int] NOT NULL,
- [TagId] [bigint] NOT NULL
- ) ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[Rarities] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[Rarities](
- [Id] [int] IDENTITY(1,1) NOT NULL,
- [Name] [nvarchar](max) NOT NULL,
- [Probability] [int] NOT NULL,
- [Rank] [int] NOT NULL,
- CONSTRAINT [PK_Rarities] PRIMARY KEY CLUSTERED
- (
- [Id] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
- ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[Reminders] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[Reminders](
- [Id] [int] IDENTITY(1,1) NOT NULL,
- [ReminderId] [uniqueidentifier] NOT NULL,
- [UserId] [int] NOT NULL,
- [ChannelId] [nvarchar](max) NOT NULL,
- [Scheduled] [datetime] NOT NULL,
- [Message] [nvarchar](max) NULL,
- CONSTRAINT [PK_Reminders] PRIMARY KEY CLUSTERED
- (
- [Id] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
- ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[RerollStats] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[RerollStats](
- [Id] [int] IDENTITY(1,1) NOT NULL,
- [UserId] [int] NOT NULL,
- [RerollCount] [int] NOT NULL,
- CONSTRAINT [PK_RerollStats] PRIMARY KEY CLUSTERED
- (
- [Id] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
- ) ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[Sacrifices] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[Sacrifices](
- [CharacterId] [int] NOT NULL,
- [UserId] [int] NOT NULL,
- [SacrificedOn] [datetime] NOT NULL
- ) ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[Sayings] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[Sayings](
- [SayingId] [int] IDENTITY(1,1) NOT NULL,
- [IsGood] [bit] NOT NULL,
- [Text] [nvarchar](max) NOT NULL,
- CONSTRAINT [PK_Sayings] PRIMARY KEY CLUSTERED
- (
- [SayingId] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
- ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[Series] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[Series](
- [Id] [int] IDENTITY(1,1) NOT NULL,
- [Name] [nvarchar](max) NOT NULL,
- [ImageUrl] [nvarchar](max) NULL,
- [AniCharId] [bigint] NOT NULL,
- [IsCustom] [bit] NULL,
- CONSTRAINT [PK_Series] PRIMARY KEY CLUSTERED
- (
- [Id] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
- ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[SeriesToFranchises] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[SeriesToFranchises](
- [FranchiseId] [int] NOT NULL,
- [SeriesId] [int] NOT NULL,
- [IsMain] [bit] NOT NULL,
- CONSTRAINT [OneSeries] UNIQUE NONCLUSTERED
- (
- [SeriesId] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
- ) ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[Ships] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[Ships](
- [LeftId] [int] NOT NULL,
- [RightId] [int] NOT NULL,
- [ShippedById] [int] NOT NULL,
- [ShipName] [nvarchar](max) NOT NULL
- ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[Stats] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[Stats](
- [Id] [int] IDENTITY(1,1) NOT NULL,
- [CharacterId] [int] NOT NULL,
- [RarityId] [int] NOT NULL,
- [RerollCount] [int] NOT NULL,
- CONSTRAINT [PK_Stats] PRIMARY KEY CLUSTERED
- (
- [Id] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
- ) ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[Tags] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[Tags](
- [Id] [bigint] IDENTITY(1,1) NOT NULL,
- [Name] [nvarchar](max) NOT NULL,
- [Type] [tinyint] NOT NULL,
- [IsBlacklisted] [bit] NOT NULL,
- [GellyId] [bigint] NULL,
- [Slug] [nvarchar](max) NOT NULL,
- CONSTRAINT [PK_Tags] PRIMARY KEY CLUSTERED
- (
- [Id] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
- ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[TimeZones] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[TimeZones](
- [Id] [int] IDENTITY(1,1) NOT NULL,
- [TimeZoneId] [nvarchar](max) NOT NULL,
- [HasDST] [bit] NOT NULL,
- [DisplayName] [nvarchar](max) NOT NULL,
- [DSTName] [nvarchar](max) NOT NULL,
- [NonDSTName] [nvarchar](max) NOT NULL,
- CONSTRAINT [PK_TimeZones] PRIMARY KEY CLUSTERED
- (
- [Id] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
- ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[TopTen] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[TopTen](
- [CharacterId] [int] NOT NULL,
- [UserId] [int] NOT NULL,
- [Position] [tinyint] NOT NULL
- ) ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[Users] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[Users](
- [Id] [int] IDENTITY(1,1) NOT NULL,
- [DiscordId] [nvarchar](max) NOT NULL,
- [Alias] [nvarchar](max) NOT NULL,
- [UserName] [nvarchar](max) NOT NULL,
- [IsBuiltIn] [bit] NOT NULL,
- [TimeZoneId] [int] NULL,
- [SendNotifications] [bit] NOT NULL,
- CONSTRAINT [PK_Users] PRIMARY KEY CLUSTERED
- (
- [Id] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
- ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
- GO
- /****** Object: Table [dbo].[Watanagashi] Script Date: 1/14/2024 10:19:49 AM ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- CREATE TABLE [dbo].[Watanagashi](
- [Id] [int] IDENTITY(1,1) NOT NULL,
- [CharacterId] [int] NOT NULL,
- [GivenBack] [bit] NOT NULL,
- [TakenOn] [datetime] NOT NULL,
- [UserId] [int] NOT NULL,
- [UserWon] [bit] NOT NULL,
- CONSTRAINT [PK_Watanagashi] PRIMARY KEY CLUSTERED
- (
- [Id] ASC
- )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
- ) ON [PRIMARY]
- GO
- ALTER TABLE [dbo].[Buddies] ADD CONSTRAINT [DF_Buddies_IsNegative] DEFAULT ((0)) FOR [IsNegative]
- GO
- ALTER TABLE [dbo].[Characters] ADD CONSTRAINT [DF_Characters_SourceId] DEFAULT ((1)) FOR [SourceId]
- GO
- ALTER TABLE [dbo].[Characters] ADD CONSTRAINT [DF_Characters_DibbedById] DEFAULT ((1)) FOR [DibbedById]
- GO
- ALTER TABLE [dbo].[DotD] ADD CONSTRAINT [DF_DotD_CharacterId] DEFAULT ((1039)) FOR [CharacterId]
- GO
- ALTER TABLE [dbo].[DotD] ADD CONSTRAINT [DF_DotD_Date] DEFAULT (CONVERT([datetime],getdate())) FOR [Date]
- GO
- ALTER TABLE [dbo].[ElementMatchups] ADD CONSTRAINT [DF_ElementMatchups_NetEffect] DEFAULT ((0)) FOR [NetEffect]
- GO
- ALTER TABLE [dbo].[Elements] ADD CONSTRAINT [DF_Elements_IsDefault] DEFAULT ((0)) FOR [IsDefault]
- GO
- ALTER TABLE [dbo].[Factions] ADD CONSTRAINT [DF_Factions_HeadId] DEFAULT ((1191)) FOR [M_HeadId]
- GO
- ALTER TABLE [dbo].[Factions] ADD CONSTRAINT [DF_Factions_Element] DEFAULT ((0)) FOR [PrimaryElementId]
- GO
- ALTER TABLE [dbo].[Factions] ADD CONSTRAINT [DF_Factions_F_HeadId] DEFAULT ((1191)) FOR [F_HeadId]
- GO
- ALTER TABLE [dbo].[FoxDay] ADD CONSTRAINT [DF_FoxDay_OccurredOn] DEFAULT (getdate()) FOR [OccurredOn]
- GO
- ALTER TABLE [dbo].[Ideas] ADD CONSTRAINT [DF_Ideas_CreatedById] DEFAULT ((1)) FOR [CreatedById]
- GO
- ALTER TABLE [dbo].[Ideas] ADD CONSTRAINT [DF_Ideas_IsCompleted] DEFAULT ((0)) FOR [IsCompleted]
- GO
- ALTER TABLE [dbo].[Ideas] ADD CONSTRAINT [DF_Ideas_CreatedOn] DEFAULT (getutcdate()) FOR [CreatedOn]
- GO
- ALTER TABLE [dbo].[Ideas] ADD CONSTRAINT [DF_Ideas_ModifiedOn] DEFAULT (getutcdate()) FOR [ModifiedOn]
- GO
- ALTER TABLE [dbo].[ImageRelationships] ADD CONSTRAINT [DF_ImageRelationships_ImageType] DEFAULT ((0)) FOR [ImageType]
- GO
- ALTER TABLE [dbo].[Images] ADD CONSTRAINT [DF_Images_UploadedById] DEFAULT ((1)) FOR [UploadedById]
- GO
- ALTER TABLE [dbo].[Images] ADD CONSTRAINT [DF_Images_UploadedUtc] DEFAULT (getutcdate()) FOR [UploadedUtc]
- GO
- ALTER TABLE [dbo].[Reminders] ADD CONSTRAINT [DF_Reminders_ReminderId] DEFAULT (newid()) FOR [ReminderId]
- GO
- ALTER TABLE [dbo].[RerollStats] ADD CONSTRAINT [DF_RerollStats_RerollCount] DEFAULT ((0)) FOR [RerollCount]
- GO
- ALTER TABLE [dbo].[Sacrifices] ADD CONSTRAINT [DF_Sacrifices_SacrificedOn] DEFAULT (getutcdate()) FOR [SacrificedOn]
- GO
- ALTER TABLE [dbo].[Series] ADD CONSTRAINT [DF_Series_IsCustom] DEFAULT ((0)) FOR [IsCustom]
- GO
- ALTER TABLE [dbo].[Ships] ADD CONSTRAINT [DF_Ships_RightId] DEFAULT ((1039)) FOR [RightId]
- GO
- ALTER TABLE [dbo].[Stats] ADD CONSTRAINT [DF_Stats_RerollCount] DEFAULT ((0)) FOR [RerollCount]
- GO
- ALTER TABLE [dbo].[TopTen] ADD CONSTRAINT [DF_TopTen_Position] DEFAULT ((10)) FOR [Position]
- GO
- ALTER TABLE [dbo].[Users] ADD CONSTRAINT [DF_Users_IsBuiltIn] DEFAULT ((0)) FOR [IsBuiltIn]
- GO
- ALTER TABLE [dbo].[Users] ADD CONSTRAINT [DF_Users_TimeZoneId] DEFAULT ((2)) FOR [TimeZoneId]
- GO
- ALTER TABLE [dbo].[Watanagashi] ADD CONSTRAINT [DF_Watanagashi_TakenOn] DEFAULT (getutcdate()) FOR [TakenOn]
- GO
- ALTER TABLE [dbo].[AL_ShipGirls] WITH CHECK ADD CONSTRAINT [FK_AL_ShipGirls_Characters] FOREIGN KEY([CharacterId])
- REFERENCES [dbo].[Characters] ([Id])
- GO
- ALTER TABLE [dbo].[AL_ShipGirls] CHECK CONSTRAINT [FK_AL_ShipGirls_Characters]
- GO
- ALTER TABLE [dbo].[APIAccess] WITH CHECK ADD CONSTRAINT [FK_APIAccess_Users] FOREIGN KEY([UserId])
- REFERENCES [dbo].[Users] ([Id])
- ON DELETE CASCADE
- GO
- ALTER TABLE [dbo].[APIAccess] CHECK CONSTRAINT [FK_APIAccess_Users]
- GO
- ALTER TABLE [dbo].[Buddies] WITH CHECK ADD CONSTRAINT [FK_Buddies_BuddyStat] FOREIGN KEY([BuddyStatId])
- REFERENCES [dbo].[Stats] ([Id])
- GO
- ALTER TABLE [dbo].[Buddies] CHECK CONSTRAINT [FK_Buddies_BuddyStat]
- GO
- ALTER TABLE [dbo].[Buddies] WITH CHECK ADD CONSTRAINT [FK_Buddies_Stats] FOREIGN KEY([StatId])
- REFERENCES [dbo].[Stats] ([Id])
- ON DELETE CASCADE
- GO
- ALTER TABLE [dbo].[Buddies] CHECK CONSTRAINT [FK_Buddies_Stats]
- GO
- ALTER TABLE [dbo].[Characters] WITH NOCHECK ADD CONSTRAINT [FK_Characters_Series] FOREIGN KEY([SourceId])
- REFERENCES [dbo].[Series] ([Id])
- GO
- ALTER TABLE [dbo].[Characters] CHECK CONSTRAINT [FK_Characters_Series]
- GO
- ALTER TABLE [dbo].[Characters] WITH NOCHECK ADD CONSTRAINT [FK_Characters_Users] FOREIGN KEY([DibbedById])
- REFERENCES [dbo].[Users] ([Id])
- GO
- ALTER TABLE [dbo].[Characters] CHECK CONSTRAINT [FK_Characters_Users]
- GO
- ALTER TABLE [dbo].[CharacterTags] WITH CHECK ADD CONSTRAINT [FK_CharacterTags_Characters] FOREIGN KEY([CharacterId])
- REFERENCES [dbo].[Characters] ([Id])
- ON DELETE CASCADE
- GO
- ALTER TABLE [dbo].[CharacterTags] CHECK CONSTRAINT [FK_CharacterTags_Characters]
- GO
- ALTER TABLE [dbo].[CharacterTags] WITH CHECK ADD CONSTRAINT [FK_CharacterTags_Tags] FOREIGN KEY([TagId])
- REFERENCES [dbo].[Tags] ([Id])
- ON DELETE CASCADE
- GO
- ALTER TABLE [dbo].[CharacterTags] CHECK CONSTRAINT [FK_CharacterTags_Tags]
- GO
- ALTER TABLE [dbo].[DotD] WITH CHECK ADD CONSTRAINT [FK_DotD_Characters] FOREIGN KEY([CharacterId])
- REFERENCES [dbo].[Characters] ([Id])
- GO
- ALTER TABLE [dbo].[DotD] CHECK CONSTRAINT [FK_DotD_Characters]
- GO
- ALTER TABLE [dbo].[DotD] WITH CHECK ADD CONSTRAINT [FK_DotD_Users] FOREIGN KEY([UserId])
- REFERENCES [dbo].[Users] ([Id])
- GO
- ALTER TABLE [dbo].[DotD] CHECK CONSTRAINT [FK_DotD_Users]
- GO
- ALTER TABLE [dbo].[ElementMatchups] WITH CHECK ADD CONSTRAINT [FK_Elements_Matchups_Attack] FOREIGN KEY([AttackingId])
- REFERENCES [dbo].[Elements] ([ElementId])
- ON DELETE CASCADE
- GO
- ALTER TABLE [dbo].[ElementMatchups] CHECK CONSTRAINT [FK_Elements_Matchups_Attack]
- GO
- ALTER TABLE [dbo].[ElementMatchups] WITH CHECK ADD CONSTRAINT [FK_Elements_Matchups_Defend] FOREIGN KEY([DefendingId])
- REFERENCES [dbo].[Elements] ([ElementId])
- GO
- ALTER TABLE [dbo].[ElementMatchups] CHECK CONSTRAINT [FK_Elements_Matchups_Defend]
- GO
- ALTER TABLE [dbo].[FactionMembership] WITH CHECK ADD CONSTRAINT [FK_FactionMembership_Characters] FOREIGN KEY([CharacterId])
- REFERENCES [dbo].[Characters] ([Id])
- ON DELETE CASCADE
- GO
- ALTER TABLE [dbo].[FactionMembership] CHECK CONSTRAINT [FK_FactionMembership_Characters]
- GO
- ALTER TABLE [dbo].[FactionMembership] WITH CHECK ADD CONSTRAINT [FK_FactionMembership_Factions] FOREIGN KEY([FactionId])
- REFERENCES [dbo].[Factions] ([FactionId])
- ON DELETE CASCADE
- GO
- ALTER TABLE [dbo].[FactionMembership] CHECK CONSTRAINT [FK_FactionMembership_Factions]
- GO
- ALTER TABLE [dbo].[Factions] WITH CHECK ADD CONSTRAINT [FK_Factions_Elements_Prim] FOREIGN KEY([PrimaryElementId])
- REFERENCES [dbo].[Elements] ([ElementId])
- ON DELETE SET DEFAULT
- GO
- ALTER TABLE [dbo].[Factions] CHECK CONSTRAINT [FK_Factions_Elements_Prim]
- GO
- ALTER TABLE [dbo].[FoxDay] WITH CHECK ADD CONSTRAINT [FK_Daily_FoxDay] FOREIGN KEY([DotDId])
- REFERENCES [dbo].[DotD] ([Id])
- ON DELETE CASCADE
- GO
- ALTER TABLE [dbo].[FoxDay] CHECK CONSTRAINT [FK_Daily_FoxDay]
- GO
- ALTER TABLE [dbo].[Ideas] WITH CHECK ADD CONSTRAINT [FK_Ideas_Users] FOREIGN KEY([CreatedById])
- REFERENCES [dbo].[Users] ([Id])
- GO
- ALTER TABLE [dbo].[Ideas] CHECK CONSTRAINT [FK_Ideas_Users]
- GO
- ALTER TABLE [dbo].[ImageRelationships] WITH CHECK ADD CONSTRAINT [FK_ImageRelationships_Characters] FOREIGN KEY([CharacterId])
- REFERENCES [dbo].[Characters] ([Id])
- ON DELETE CASCADE
- GO
- ALTER TABLE [dbo].[ImageRelationships] CHECK CONSTRAINT [FK_ImageRelationships_Characters]
- GO
- ALTER TABLE [dbo].[ImageRelationships] WITH CHECK ADD CONSTRAINT [FK_ImageRelationships_Images] FOREIGN KEY([ImageId])
- REFERENCES [dbo].[Images] ([Id])
- ON DELETE CASCADE
- GO
- ALTER TABLE [dbo].[ImageRelationships] CHECK CONSTRAINT [FK_ImageRelationships_Images]
- GO
- ALTER TABLE [dbo].[Images] WITH NOCHECK ADD CONSTRAINT [FK_Images_Users] FOREIGN KEY([UploadedById])
- REFERENCES [dbo].[Users] ([Id])
- GO
- ALTER TABLE [dbo].[Images] CHECK CONSTRAINT [FK_Images_Users]
- GO
- ALTER TABLE [dbo].[ImageTags] WITH CHECK ADD CONSTRAINT [FK_ImageTags_Images] FOREIGN KEY([TagId])
- REFERENCES [dbo].[Tags] ([Id])
- ON DELETE CASCADE
- GO
- ALTER TABLE [dbo].[ImageTags] CHECK CONSTRAINT [FK_ImageTags_Images]
- GO
- ALTER TABLE [dbo].[ImageTags] WITH CHECK ADD CONSTRAINT [FK_ImageTags_Images1] FOREIGN KEY([ImageId])
- REFERENCES [dbo].[Images] ([Id])
- ON DELETE CASCADE
- GO
- ALTER TABLE [dbo].[ImageTags] CHECK CONSTRAINT [FK_ImageTags_Images1]
- GO
- ALTER TABLE [dbo].[Reminders] WITH CHECK ADD CONSTRAINT [FK_Reminders_Users] FOREIGN KEY([UserId])
- REFERENCES [dbo].[Users] ([Id])
- GO
- ALTER TABLE [dbo].[Reminders] CHECK CONSTRAINT [FK_Reminders_Users]
- GO
- ALTER TABLE [dbo].[RerollStats] WITH CHECK ADD CONSTRAINT [FK_RerollStats_Users] FOREIGN KEY([UserId])
- REFERENCES [dbo].[Users] ([Id])
- ON DELETE CASCADE
- GO
- ALTER TABLE [dbo].[RerollStats] CHECK CONSTRAINT [FK_RerollStats_Users]
- GO
- ALTER TABLE [dbo].[Sacrifices] WITH CHECK ADD CONSTRAINT [FK_Sacrifices_Characters] FOREIGN KEY([CharacterId])
- REFERENCES [dbo].[Characters] ([Id])
- ON DELETE CASCADE
- GO
- ALTER TABLE [dbo].[Sacrifices] CHECK CONSTRAINT [FK_Sacrifices_Characters]
- GO
- ALTER TABLE [dbo].[Sacrifices] WITH CHECK ADD CONSTRAINT [FK_Sacrifices_Users] FOREIGN KEY([UserId])
- REFERENCES [dbo].[Users] ([Id])
- ON DELETE CASCADE
- GO
- ALTER TABLE [dbo].[Sacrifices] CHECK CONSTRAINT [FK_Sacrifices_Users]
- GO
- ALTER TABLE [dbo].[SeriesToFranchises] WITH NOCHECK ADD CONSTRAINT [FK_SeriesToFranchises_Franchises] FOREIGN KEY([FranchiseId])
- REFERENCES [dbo].[Franchises] ([FranchiseId])
- GO
- ALTER TABLE [dbo].[SeriesToFranchises] CHECK CONSTRAINT [FK_SeriesToFranchises_Franchises]
- GO
- ALTER TABLE [dbo].[SeriesToFranchises] WITH NOCHECK ADD CONSTRAINT [FK_SeriesToFranchises_Series] FOREIGN KEY([SeriesId])
- REFERENCES [dbo].[Series] ([Id])
- ON DELETE CASCADE
- GO
- ALTER TABLE [dbo].[SeriesToFranchises] CHECK CONSTRAINT [FK_SeriesToFranchises_Series]
- GO
- ALTER TABLE [dbo].[Ships] WITH CHECK ADD CONSTRAINT [FK_Ships_Characters_Left] FOREIGN KEY([LeftId])
- REFERENCES [dbo].[Characters] ([Id])
- GO
- ALTER TABLE [dbo].[Ships] CHECK CONSTRAINT [FK_Ships_Characters_Left]
- GO
- ALTER TABLE [dbo].[Ships] WITH CHECK ADD CONSTRAINT [FK_Ships_Characters_Right] FOREIGN KEY([RightId])
- REFERENCES [dbo].[Characters] ([Id])
- GO
- ALTER TABLE [dbo].[Ships] CHECK CONSTRAINT [FK_Ships_Characters_Right]
- GO
- ALTER TABLE [dbo].[Ships] WITH CHECK ADD CONSTRAINT [FK_Ships_Users] FOREIGN KEY([ShippedById])
- REFERENCES [dbo].[Users] ([Id])
- GO
- ALTER TABLE [dbo].[Ships] CHECK CONSTRAINT [FK_Ships_Users]
- GO
- ALTER TABLE [dbo].[Stats] WITH CHECK ADD CONSTRAINT [FK_Stats_Characters] FOREIGN KEY([CharacterId])
- REFERENCES [dbo].[Characters] ([Id])
- GO
- ALTER TABLE [dbo].[Stats] CHECK CONSTRAINT [FK_Stats_Characters]
- GO
- ALTER TABLE [dbo].[Stats] WITH CHECK ADD CONSTRAINT [FK_Stats_Rarities] FOREIGN KEY([RarityId])
- REFERENCES [dbo].[Rarities] ([Id])
- GO
- ALTER TABLE [dbo].[Stats] CHECK CONSTRAINT [FK_Stats_Rarities]
- GO
- ALTER TABLE [dbo].[TopTen] WITH CHECK ADD CONSTRAINT [FK_TopTen_Characters] FOREIGN KEY([CharacterId])
- REFERENCES [dbo].[Characters] ([Id])
- ON DELETE CASCADE
- GO
- ALTER TABLE [dbo].[TopTen] CHECK CONSTRAINT [FK_TopTen_Characters]
- GO
- ALTER TABLE [dbo].[TopTen] WITH CHECK ADD CONSTRAINT [FK_TopTen_Users] FOREIGN KEY([UserId])
- REFERENCES [dbo].[Users] ([Id])
- ON DELETE CASCADE
- GO
- ALTER TABLE [dbo].[TopTen] CHECK CONSTRAINT [FK_TopTen_Users]
- GO
- ALTER TABLE [dbo].[Users] WITH CHECK ADD CONSTRAINT [FK_Users_TimeZones] FOREIGN KEY([TimeZoneId])
- REFERENCES [dbo].[TimeZones] ([Id])
- GO
- ALTER TABLE [dbo].[Users] CHECK CONSTRAINT [FK_Users_TimeZones]
- GO
- ALTER TABLE [dbo].[Watanagashi] WITH CHECK ADD CONSTRAINT [FK_Watanagashi_Characters] FOREIGN KEY([CharacterId])
- REFERENCES [dbo].[Characters] ([Id])
- ON DELETE CASCADE
- GO
- ALTER TABLE [dbo].[Watanagashi] CHECK CONSTRAINT [FK_Watanagashi_Characters]
- GO
- ALTER TABLE [dbo].[Watanagashi] WITH CHECK ADD CONSTRAINT [FK_Watanagashi_Users] FOREIGN KEY([UserId])
- REFERENCES [dbo].[Users] ([Id])
- ON DELETE CASCADE
- GO
- ALTER TABLE [dbo].[Watanagashi] CHECK CONSTRAINT [FK_Watanagashi_Users]
- GO
- ALTER TABLE [dbo].[ElementMatchups] WITH CHECK ADD CONSTRAINT [CK_NetEffect_IsInRange] CHECK (([NetEffect]>=(-1) AND [NetEffect]<=(1)))
- GO
- ALTER TABLE [dbo].[ElementMatchups] CHECK CONSTRAINT [CK_NetEffect_IsInRange]
- GO
- ALTER TABLE [dbo].[Factions] WITH CHECK ADD CONSTRAINT [CK_FactionElements] CHECK (([PrimaryElementId]<>coalesce([SecondaryElementId],(0))))
- GO
- ALTER TABLE [dbo].[Factions] CHECK CONSTRAINT [CK_FactionElements]
- GO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement