Anton Afanasyev avatar Anton Afanasyev committed cc84822

Replace instances of "YourCompany" template var with "SafeYourCompany" in the .SqlDataProvider files

Comments (0)

Files changed (2)

CS/Providers/DataProviders/SqlDataProvider/00.00.01.SqlDataProvider

 
 /** Create $safeprojectname$ data table **/
 
-if not exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}[{objectQualifier}$YourCompany$_$safeprojectname$]') and OBJECTPROPERTY(id, N'IsTable') = 1)
+if not exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}[{objectQualifier}$SafeYourCompany$_$safeprojectname$]') and OBJECTPROPERTY(id, N'IsTable') = 1)
     BEGIN
-        CREATE TABLE {databaseOwner}[{objectQualifier}$YourCompany$_$safeprojectname$]
+        CREATE TABLE {databaseOwner}[{objectQualifier}$SafeYourCompany$_$safeprojectname$]
         (
             [ModuleID] [int] NOT NULL,
             [ItemID] [int] NOT NULL IDENTITY(1, 1),
             [CreatedDate] [datetime] NOT NULL
         )
 
-        ALTER TABLE {databaseOwner}[{objectQualifier}$YourCompany$_$safeprojectname$] ADD CONSTRAINT [PK_{objectQualifier}$YourCompany$_$safeprojectname$] PRIMARY KEY CLUSTERED  ([ItemID])
-        CREATE NONCLUSTERED INDEX [IX_{objectQualifier}$YourCompany$_$safeprojectname$] ON {databaseOwner}[{objectQualifier}$YourCompany$_$safeprojectname$] ([ModuleID])
+        ALTER TABLE {databaseOwner}[{objectQualifier}$SafeYourCompany$_$safeprojectname$] ADD CONSTRAINT [PK_{objectQualifier}$SafeYourCompany$_$safeprojectname$] PRIMARY KEY CLUSTERED  ([ItemID])
+        CREATE NONCLUSTERED INDEX [IX_{objectQualifier}$SafeYourCompany$_$safeprojectname$] ON {databaseOwner}[{objectQualifier}$SafeYourCompany$_$safeprojectname$] ([ModuleID])
 
-        ALTER TABLE {databaseOwner}[{objectQualifier}$YourCompany$_$safeprojectname$] WITH NOCHECK ADD CONSTRAINT [FK_{objectQualifier}$YourCompany$_$safeprojectname$_{objectQualifier}Modules] FOREIGN KEY ([ModuleID]) REFERENCES {databaseOwner}[{objectQualifier}Modules] ([ModuleID]) ON DELETE CASCADE NOT FOR REPLICATION
+        ALTER TABLE {databaseOwner}[{objectQualifier}$SafeYourCompany$_$safeprojectname$] WITH NOCHECK ADD CONSTRAINT [FK_{objectQualifier}$SafeYourCompany$_$safeprojectname$_{objectQualifier}Modules] FOREIGN KEY ([ModuleID]) REFERENCES {databaseOwner}[{objectQualifier}Modules] ([ModuleID]) ON DELETE CASCADE NOT FOR REPLICATION
     END
 GO
 
 
 /** Drop Existing Stored Procedures **/
 
-if exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}[{objectQualifier}$YourCompany$_Get$safeprojectname$s]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
-    drop procedure {databaseOwner}{objectQualifier}$YourCompany$_Get$safeprojectname$s
+if exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}[{objectQualifier}$SafeYourCompany$_Get$safeprojectname$s]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
+    drop procedure {databaseOwner}{objectQualifier}$SafeYourCompany$_Get$safeprojectname$s
 GO
 
-if exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}[{objectQualifier}$YourCompany$_Get$safeprojectname$]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
-    drop procedure {databaseOwner}{objectQualifier}$YourCompany$_Get$safeprojectname$
+if exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}[{objectQualifier}$SafeYourCompany$_Get$safeprojectname$]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
+    drop procedure {databaseOwner}{objectQualifier}$SafeYourCompany$_Get$safeprojectname$
 GO
 
-if exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}[{objectQualifier}$YourCompany$_Add$safeprojectname$]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
-    drop procedure {databaseOwner}{objectQualifier}$YourCompany$_Add$safeprojectname$
+if exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}[{objectQualifier}$SafeYourCompany$_Add$safeprojectname$]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
+    drop procedure {databaseOwner}{objectQualifier}$SafeYourCompany$_Add$safeprojectname$
 GO
 
-if exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}[{objectQualifier}$YourCompany$_Update$safeprojectname$]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
-    drop procedure {databaseOwner}{objectQualifier}$YourCompany$_Update$safeprojectname$
+if exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}[{objectQualifier}$SafeYourCompany$_Update$safeprojectname$]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
+    drop procedure {databaseOwner}{objectQualifier}$SafeYourCompany$_Update$safeprojectname$
 GO
 
-if exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}[{objectQualifier}$YourCompany$_Delete$safeprojectname$]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
-    drop procedure {databaseOwner}{objectQualifier}$YourCompany$_Delete$safeprojectname$
+if exists (select * from dbo.sysobjects where id = object_id(N'{databaseOwner}[{objectQualifier}$SafeYourCompany$_Delete$safeprojectname$]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
+    drop procedure {databaseOwner}{objectQualifier}$SafeYourCompany$_Delete$safeprojectname$
 GO
 
 /** Create Stored Procedures **/
 
 
-create procedure {databaseOwner}{objectQualifier}$YourCompany$_Get$safeprojectname$s
+create procedure {databaseOwner}{objectQualifier}$SafeYourCompany$_Get$safeprojectname$s
 
     @ModuleId int
 
        ItemId,
        Content,
        CreatedByUser,
-       {objectQualifier}$YourCompany$_$safeprojectname$.CreatedDate,
+       {objectQualifier}$SafeYourCompany$_$safeprojectname$.CreatedDate,
        'CreatedByUserName' = {objectQualifier}Users.FirstName + ' ' + {objectQualifier}Users.LastName
-from {objectQualifier}$YourCompany$_$safeprojectname$
-inner join {objectQualifier}Users on {objectQualifier}$YourCompany$_$safeprojectname$.CreatedByUser = {objectQualifier}Users.UserId
+from {objectQualifier}$SafeYourCompany$_$safeprojectname$
+inner join {objectQualifier}Users on {objectQualifier}$SafeYourCompany$_$safeprojectname$.CreatedByUser = {objectQualifier}Users.UserId
 where  ModuleId = @ModuleId
 GO
 
-create procedure {databaseOwner}{objectQualifier}$YourCompany$_Get$safeprojectname$
+create procedure {databaseOwner}{objectQualifier}$SafeYourCompany$_Get$safeprojectname$
 
     @ModuleId int,
         @ItemId int
        ItemId,
        Content,
        CreatedByUser,
-       {objectQualifier}$YourCompany$_$safeprojectname$.CreatedDate,
+       {objectQualifier}$SafeYourCompany$_$safeprojectname$.CreatedDate,
        'CreatedByUserName' = {objectQualifier}Users.FirstName + ' ' + {objectQualifier}Users.LastName
-from {objectQualifier}$YourCompany$_$safeprojectname$
-inner join {objectQualifier}Users on {objectQualifier}$YourCompany$_$safeprojectname$.CreatedByUser = {objectQualifier}Users.UserId
+from {objectQualifier}$SafeYourCompany$_$safeprojectname$
+inner join {objectQualifier}Users on {objectQualifier}$SafeYourCompany$_$safeprojectname$.CreatedByUser = {objectQualifier}Users.UserId
 where  ModuleId = @ModuleId
 and ItemId = @ItemId
 GO
 
 
-create procedure {databaseOwner}{objectQualifier}$YourCompany$_Add$safeprojectname$
+create procedure {databaseOwner}{objectQualifier}$SafeYourCompany$_Add$safeprojectname$
 
     @ModuleId       int,
     @Content        ntext,
 
 as
 
-insert into {objectQualifier}$YourCompany$_$safeprojectname$ (
+insert into {objectQualifier}$SafeYourCompany$_$safeprojectname$ (
     ModuleId,
     Content,
     CreatedByUser,
 
 GO
 
-create procedure {databaseOwner}{objectQualifier}$YourCompany$_Update$safeprojectname$
+create procedure {databaseOwner}{objectQualifier}$SafeYourCompany$_Update$safeprojectname$
 
     @ModuleId       int,
         @ItemId         int,
 
 as
 
-update {objectQualifier}$YourCompany$_$safeprojectname$
+update {objectQualifier}$SafeYourCompany$_$safeprojectname$
 set    Content       = @Content,
        CreatedByUser = @UserID,
        CreatedDate   = getdate()
 
 GO
 
-create procedure {databaseOwner}{objectQualifier}$YourCompany$_Delete$safeprojectname$
+create procedure {databaseOwner}{objectQualifier}$SafeYourCompany$_Delete$safeprojectname$
 
     @ModuleId       int,
         @ItemId         int
 as
 
 delete
-from   {objectQualifier}$YourCompany$_$safeprojectname$
+from   {objectQualifier}$SafeYourCompany$_$safeprojectname$
 where  ModuleId = @ModuleId
 and    ItemId = @ItemId
 

CS/Providers/DataProviders/SqlDataProvider/Uninstall.SqlDataProvider

 
 /** Drop $safeprojectname$ data table **/
 
-ALTER TABLE {databaseOwner}[{objectQualifier}$YourCompany$_$safeprojectname$] DROP CONSTRAINT [FK_{objectQualifier}$safeprojectname$_{objectQualifier}Modules]
+ALTER TABLE {databaseOwner}[{objectQualifier}$SafeYourCompany$_$safeprojectname$] DROP CONSTRAINT [FK_{objectQualifier}$safeprojectname$_{objectQualifier}Modules]
 GO
 
-ALTER TABLE {databaseOwner}[{objectQualifier}$YourCompany$_$safeprojectname$] DROP CONSTRAINT [PK_{objectQualifier}$YourCompany$_$safeprojectname$]
+ALTER TABLE {databaseOwner}[{objectQualifier}$SafeYourCompany$_$safeprojectname$] DROP CONSTRAINT [PK_{objectQualifier}$SafeYourCompany$_$safeprojectname$]
 GO
 
-DROP INDEX {databaseOwner}[{objectQualifier}$YourCompany$_$safeprojectname$].[IX_{objectQualifier}$YourCompany$_$safeprojectname$]
+DROP INDEX {databaseOwner}[{objectQualifier}$SafeYourCompany$_$safeprojectname$].[IX_{objectQualifier}$SafeYourCompany$_$safeprojectname$]
 GO
 
-DROP TABLE {databaseOwner}[{objectQualifier}$YourCompany$_$safeprojectname$]
+DROP TABLE {databaseOwner}[{objectQualifier}$SafeYourCompany$_$safeprojectname$]
 GO
 
 /** Drop Stored Procedures **/
 
-DROP PROCEDURE {databaseOwner}[{objectQualifier}$YourCompany$_Get$safeprojectname$s]
+DROP PROCEDURE {databaseOwner}[{objectQualifier}$SafeYourCompany$_Get$safeprojectname$s]
 GO
 
-DROP PROCEDURE {databaseOwner}[{objectQualifier}$YourCompany$_Get$safeprojectname$]
+DROP PROCEDURE {databaseOwner}[{objectQualifier}$SafeYourCompany$_Get$safeprojectname$]
 GO
 
-DROP PROCEDURE {databaseOwner}[{objectQualifier}$YourCompany$_Add$safeprojectname$]
+DROP PROCEDURE {databaseOwner}[{objectQualifier}$SafeYourCompany$_Add$safeprojectname$]
 GO
 
-DROP PROCEDURE {databaseOwner}[{objectQualifier}$YourCompany$_Update$safeprojectname$]
+DROP PROCEDURE {databaseOwner}[{objectQualifier}$SafeYourCompany$_Update$safeprojectname$]
 GO
 
-DROP PROCEDURE {databaseOwner}[{objectQualifier}$YourCompany$_Delete$safeprojectname$]
+DROP PROCEDURE {databaseOwner}[{objectQualifier}$SafeYourCompany$_Delete$safeprojectname$]
 GO
 
 /************************************************************/
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.