declare @schema varchar(255)
set @schema = 'FIES'

insert into [dbo].[T_SCHEMA](SchemaName, [Priority])
values(@schema, 2)

update T_ENTITIES
set [Schema] = @schema
where [Schema] is null

update T_ADDITIONAL_ENTITIES
set [Schema] = @schema
where [Schema] is null


ALTER TABLE [dbo].[T_ENTITIES] ALTER COLUMN [Schema] varchar(255) NOT NULL
GO

ALTER TABLE [dbo].[T_ADDITIONAL_ENTITIES] ALTER COLUMN [Schema] varchar(255) NOT NULL
GO
