增加 InitData.sql 文件负责初始化数据库,删除不用的数据库脚本
This commit is contained in:
parent
5931065434
commit
9f299d6d01
|
@ -7,6 +7,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bootstrap.DataAccess", "Boo
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sql", "sql", "{87319AF5-7C40-4362-B67C-35F9DD737DB4}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sql", "sql", "{87319AF5-7C40-4362-B67C-35F9DD737DB4}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
DatabaseScripts\InitData.sql = DatabaseScripts\InitData.sql
|
||||||
DatabaseScripts\Install.sql = DatabaseScripts\Install.sql
|
DatabaseScripts\Install.sql = DatabaseScripts\Install.sql
|
||||||
DatabaseScripts\Readme.txt = DatabaseScripts\Readme.txt
|
DatabaseScripts\Readme.txt = DatabaseScripts\Readme.txt
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
|
|
Binary file not shown.
|
@ -1,14 +1,18 @@
|
||||||
USE [BootstrapAdmin]
|
USE [BootstrapAdmin]
|
||||||
GO
|
GO
|
||||||
/* added by argo the default password is 123789 */
|
|
||||||
insert into Users (UserName, Password, PassSalt, DisplayName) values ('Admin', 'Es7WVgNsJuELwWK8daCqufUBknCsSC0IYDphQZAiGOo=', 'W5vpBEOYRGHkQXatN0t+ECM/U8cHDuEgrq56+zZBk4J481xH', 'Administrator')
|
|
||||||
GO
|
|
||||||
|
|
||||||
|
DELETE From Users where ID = 1
|
||||||
|
SET IDENTITY_INSERT [dbo].[Users] ON
|
||||||
|
insert into Users (ID, UserName, Password, PassSalt, DisplayName) values (1, 'Admin', 'Es7WVgNsJuELwWK8daCqufUBknCsSC0IYDphQZAiGOo=', 'W5vpBEOYRGHkQXatN0t+ECM/U8cHDuEgrq56+zZBk4J481xH', 'Administrator')
|
||||||
|
SET IDENTITY_INSERT [dbo].[Users] OFF
|
||||||
|
|
||||||
|
DELETE From Dicts where ID in (1, 2)
|
||||||
SET IDENTITY_INSERT [dbo].[Dicts] ON
|
SET IDENTITY_INSERT [dbo].[Dicts] ON
|
||||||
INSERT [dbo].[Dicts] ([ID], [Category], [Name], [Code]) VALUES (1, N'菜单', N'系统菜单', '0')
|
INSERT [dbo].[Dicts] ([ID], [Category], [Name], [Code]) VALUES (1, N'菜单', N'系统菜单', '0')
|
||||||
INSERT [dbo].[Dicts] ([ID], [Category], [Name], [Code]) VALUES (2, N'菜单', N'外部菜单', '1')
|
INSERT [dbo].[Dicts] ([ID], [Category], [Name], [Code]) VALUES (2, N'菜单', N'外部菜单', '1')
|
||||||
SET IDENTITY_INSERT [dbo].[Dicts] OFF
|
SET IDENTITY_INSERT [dbo].[Dicts] OFF
|
||||||
|
|
||||||
|
DELETE FROM Navigations where ID in (1, 2, 3, 4, 5, 6, 7)
|
||||||
SET IDENTITY_INSERT [dbo].[Navigations] ON
|
SET IDENTITY_INSERT [dbo].[Navigations] ON
|
||||||
INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (1, 0, N'菜单管理', 10, N'fa fa-dashboard', N'~/Admin/Menus', N'0')
|
INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (1, 0, N'菜单管理', 10, N'fa fa-dashboard', N'~/Admin/Menus', N'0')
|
||||||
INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (2, 0, N'用户管理', 20, N'fa fa-user', N'~/Admin/Users', N'0')
|
INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (2, 0, N'用户管理', 20, N'fa fa-user', N'~/Admin/Users', N'0')
|
|
@ -1,26 +0,0 @@
|
||||||
SET ANSI_NULLS ON
|
|
||||||
GO
|
|
||||||
SET QUOTED_IDENTIFIER ON
|
|
||||||
GO
|
|
||||||
-- =============================================
|
|
||||||
-- Author: Argo Zhang
|
|
||||||
-- Create date: 2016-09-06
|
|
||||||
-- Description:
|
|
||||||
-- =============================================
|
|
||||||
CREATE PROCEDURE Proc_StartTerminal
|
|
||||||
-- Add the parameters for the stored procedure here
|
|
||||||
@tId int,
|
|
||||||
@rId int
|
|
||||||
WITH ENCRYPTION
|
|
||||||
AS
|
|
||||||
BEGIN
|
|
||||||
-- SET NOCOUNT ON added to prevent extra result sets from
|
|
||||||
-- interfering with SELECT statements.
|
|
||||||
SET NOCOUNT ON;
|
|
||||||
SET XACT_ABORT ON;
|
|
||||||
-- Insert statements for procedure here
|
|
||||||
delete from TerminalRuleConfig where TerminalID = @tId;
|
|
||||||
insert into TerminalRuleConfig (TerminalID, RuleID) values (@tId, @rId);
|
|
||||||
update Terminals set Status = 1 where Id = @tId;
|
|
||||||
END
|
|
||||||
GO
|
|
|
@ -1,24 +0,0 @@
|
||||||
SET ANSI_NULLS ON
|
|
||||||
GO
|
|
||||||
SET QUOTED_IDENTIFIER ON
|
|
||||||
GO
|
|
||||||
-- =============================================
|
|
||||||
-- Author: Argo Zhang
|
|
||||||
-- Create date: 2016-09-06
|
|
||||||
-- Description:
|
|
||||||
-- =============================================
|
|
||||||
CREATE PROCEDURE Proc_StopTerminal
|
|
||||||
-- Add the parameters for the stored procedure here
|
|
||||||
@tId int
|
|
||||||
WITH ENCRYPTION
|
|
||||||
AS
|
|
||||||
BEGIN
|
|
||||||
-- SET NOCOUNT ON added to prevent extra result sets from
|
|
||||||
-- interfering with SELECT statements.
|
|
||||||
SET NOCOUNT ON;
|
|
||||||
SET XACT_ABORT ON;
|
|
||||||
-- Insert statements for procedure here
|
|
||||||
delete from TerminalRuleConfig where TerminalID = @tId;
|
|
||||||
update Terminals set Status = 0 where Id = @tId;
|
|
||||||
END
|
|
||||||
GO
|
|
Loading…
Reference in New Issue