Log In View a printable version of the current page. Get help from the Confluence website.
Last changed on mar 14, 2006 by Rahul Singh

Naming conventions

  1. All Rainbow procedures are prefixed with "rb_". Eg. rb_Announcements
  2. All staging tables are Postfixed with "_st". Eg. rb_Announcements_st

Release note

  1. Increment the release number in AssemblyInfo.cs
  2. Open "Setup\Scripts\History.xml" and add a new entry:
    <Release>
                <Id>1608</Id>
                <Version>1.2.8.1608</Version>
                <Script>1.2.8.1608.sql</Script>
                <Date>2003-04-08T00:00:00.0000000+02:00</Date>
          </Release>
  3. Create the script on "Setup\Scripts" folder
  4. Add on top of file the db version update (date in MM/DDYYYY)
    ---------------------
    --1.2.8.1608.sql
    ---------------------
 
INSERT INTO [rb_Versions] ([Release],[Version],[ReleaseDate]) VALUES('1608','1.2.8.1608', CONVERT(datetime, '04/08/2003', 101))
GO

Script conventions

New auto update splits scripts on GO keyword and execute it as command…
Some sql enterprise scripts need slights modifications
1) Remove dbo from rainbow Tables and procedures. Must be retained for system tables and not rainbow tables/procedures in general
NOif exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[AddMessage]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [AddMessage]
YESif exists (select * from dbo.sysobjects where id = object_id(N'[AddMessage]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [AddMessage]
2) Remove all COLLATE specification and use in any case the db default
3) Do not use any explicit reference to Rainbow database
NOUse [Rainbow] 4) Do not use any explicit reference to dbo user
NOINSERT INTO #TMPResults EXEC rb_GetRelatedTables 'Modules', 'dbo'
YESINSERT INTO #TMPResults EXEC rb_GetRelatedTables 'Modules' 5) Always check before do changes
NOdrop procedure [AddLink]
GO
YESif exists (select * from dbo.sysobjects where id = object_id(N'[AddLink]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [AddLink]
GO
6) If you drop and recreate with a different name double check the existence for both versions
NOdrop procedure [AddLink]
GO
YESif exists (select * from dbo.sysobjects where id = object_id(N'[AddLink]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [AddLink]
GO
7) Be sure transactions are not across GO commands:
NOYES
BEGIN TRANSACTION

GO
COMMIT
BEGIN TRANSACTION

COMMIT
GO
8) Never change explicitly the current user
9) Keep comments before GO commands
NOUPDATE rblang_Language
SET [en] = @Translation
WHERE ([Key] = @Key) AND ([en] = '' or [en] IS NULL)
GO
--end localization
YESUPDATE rblang_Language
SET [en] = @Translation
WHERE ([Key] = @Key) AND ([en] = '' or [en] IS NULL)
--end localization
GO
10) Keep commands on the same GO
NOSET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
 
ALTER PROCEDURE UpdateTab|
YESSET QUOTED_IDENTIFIER ON
SET ANSI_NULLS ON
ALTER PROCEDURE UpdateTab
 

0 comments
 
This site is running on Atlassian Confluence with a free Open Source Project / Non-profit License (license details).
Confluence is professional wiki, blog and knowledge management tool. Evaluate Confluence for your organisation.
Powered by Atlassian Confluence (Version: 1.3.5 Build:#122 mar 01, 2005) - Bug/feature request - Contact Administrators