﻿/*
This script was created by Visual Studio on 2/18/2014 at 5:09 PM.
Run this script on (localdb)\Projects.C2P_Project (STEAMWAREWIN\samuele) to make it the same as 10.74.82.217\SQL2008R2.Proxima_C2P (sa).
This script performs its actions in the following order:
1. Disable foreign-key constraints.
2. Perform DELETE commands. 
3. Perform UPDATE commands.
4. Perform INSERT commands.
5. Re-enable foreign-key constraints.
Please back up your target database before running this script.
*/
SET NUMERIC_ROUNDABORT OFF
GO
SET XACT_ABORT, ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON
GO
/*Pointer used for text / image updates. This might not be needed, but is declared here just in case*/
DECLARE @pv binary(16)
BEGIN TRANSACTION

INSERT INTO [dbo].[Lingue] ([Lingua], [DescrizioneLingua]) VALUES (N'EN', N'English')
INSERT INTO [dbo].[Lingue] ([Lingua], [DescrizioneLingua]) VALUES (N'IT', N'Italiano')

ALTER TABLE [dbo].[Vocabolario] DROP CONSTRAINT [FK_Vocabolario_Lingue]
INSERT INTO [dbo].[Vocabolario] ([Lingua], [Lemma], [Traduzione]) VALUES (N'EN', N'ac[A]rticolo', N'[A]rticolo')
INSERT INTO [dbo].[Vocabolario] ([Lingua], [Lemma], [Traduzione]) VALUES (N'EN', N'ac[C]liente', N'[C]liente')
INSERT INTO [dbo].[Vocabolario] ([Lingua], [Lemma], [Traduzione]) VALUES (N'IT', N'ac[A]rticolo', N'[A]rticolo')
INSERT INTO [dbo].[Vocabolario] ([Lingua], [Lemma], [Traduzione]) VALUES (N'IT', N'ac[C]liente', N'[C]liente')

INSERT INTO [dbo].[Vocabolario] ([Lingua], [Lemma], [Traduzione]) VALUES (N'EN', N'ac[L]ega', N'[L]ega')
INSERT INTO [dbo].[Vocabolario] ([Lingua], [Lemma], [Traduzione]) VALUES (N'IT', N'ac[L]ega', N'[L]ega')
ALTER TABLE [dbo].[Vocabolario]
    WITH NOCHECK ADD CONSTRAINT [FK_Vocabolario_Lingue] FOREIGN KEY ([Lingua]) REFERENCES [dbo].[Lingue] ([Lingua]) ON UPDATE CASCADE
COMMIT TRANSACTION
