IF NOT EXISTS (SELECT * FROM sysobjects WHERE id = object_id(N'[dbo].[pal_GoogleUser]')
 AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
	CREATE TABLE [dbo].[pal_GoogleUser](
		[recId] [int] IDENTITY(1,1) NOT NULL,
		[name] [varchar](50) NULL,
		[email] [varchar](50) NULL,
		[givenName] [varchar](50) NULL,
		[familyName] [varchar](50) NULL,
		[imageURL] [varchar](200) NULL,
		[profileId] [varchar](50) NULL,
		[userId] [int] NULL,
	 CONSTRAINT [PK_pal_GoogleAuth] PRIMARY KEY CLUSTERED 
	(
		[recId] ASC
	)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
	) ON [PRIMARY]
END

IF NOT EXISTS(
    SELECT *
    FROM sys.columns 
    WHERE Name      = N'isGoogleSignIn'
      AND Object_ID = Object_ID(N'pal_Setup'))
BEGIN
    ALTER TABLE pal_Setup
	ADD isGoogleSignIn BIT null; 
END

