-- noinspection SqlNoDataSourceInspectionForFile

-- Schema: daily_goals
-- Brief: DailyGoals component controller
-- Created by: nromero
-- Table schema_version: must be defined for database update through the DailyGoalsPersistence component

CREATE TABLE schema_version AS
SELECT "$Author: nromero $" AS Author,
       "$Date: 2021-11-23 16:00:00 -0300$" AS LastModifiedAt,
       "$Revision: 5b4f3c6c6cdcd59a6925efcd6b32f4b25101eeb3$" AS Revision;

-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

CREATE TABLE SalesChallenge (
  Id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
  Name VARCHAR NOT NULL,
  StartDate DATE NOT NULL,
  EndDate DATE NULL,
  Products VARCHAR NOT NULL,
  CreatedBy INTEGER NOT NULL
);

CREATE UNIQUE INDEX 'idx_SalesChallenge_Id' ON 'SalesChallenge' ('Id');

-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
