IF NOT EXISTS (SELECT name FROM sys.databases WHERE name = N'coi_db')
BEGIN
    CREATE DATABASE coi_db;
END;
GO
