-- Creating table 'NB_RssChannel'
CREATE TABLE [dbo].[NB_RssChannel] (
    [ChannelId] int  NOT NULL,
    [RssUrl] nvarchar(max)  NOT NULL,
    [UpdateInterval] int  NOT NULL
);
GO

-- Creating primary key on [ChannelId] in table 'NB_RssChannel'
ALTER TABLE [dbo].[NB_RssChannel]
ADD CONSTRAINT [PK_NB_RssChannel]
    PRIMARY KEY CLUSTERED ([ChannelId] ASC);
GO

-- Creating foreign key on [ChannelId] in table 'NB_RssChannel'
ALTER TABLE [dbo].[NB_RssChannel]
ADD CONSTRAINT [FK_NB_RssChannelNB_Channel]
    FOREIGN KEY ([ChannelId])
    REFERENCES [dbo].[NB_Channel]
        ([ChannelID])
    ON DELETE CASCADE ON UPDATE NO ACTION;
GO

INSERT INTO NB_ContentType([Name], [ExtendedProperties], [Active]) VALUES('RSS', '{"plusDays":7,"isVisible":false}', 1)