-- Schema: fineract_0001-mifos-platform-shared-tenants
CREATE SCHEMA IF NOT EXISTS "fineract_0001-mifos-platform-shared-tenants";

-- Table: tenants
CREATE TABLE "fineract_0001-mifos-platform-shared-tenants"."tenants" (
    "id" BIGINT NOT NULL DEFAULT nextval('"fineract_0001-mifos-platform-shared-tenants".tenants_id_seq'::regclass),
    "identifier" VARCHAR(100) NOT NULL,
    "name" VARCHAR(100) NOT NULL,
    "schema_name" VARCHAR(100) NOT NULL,
    "timezone_id" VARCHAR(100) NOT NULL,
    "country_id" INTEGER,
    "joined_date" DATE,
    "created_date" TIMESTAMP,
    "lastmodified_date" TIMESTAMP,
    "schema_server" VARCHAR(100) NOT NULL DEFAULT 'localhost'::character varying,
    "schema_server_port" VARCHAR(10) NOT NULL DEFAULT '3306'::character varying,
    "schema_username" VARCHAR(100) NOT NULL DEFAULT 'root'::character varying,
    "schema_password" VARCHAR(100) NOT NULL DEFAULT 'mysql'::character varying,
    "auto_update" SMALLINT NOT NULL DEFAULT '1'::smallint,
    CONSTRAINT "tenants_pkey" PRIMARY KEY ("id")
);

-- Table: timezones
CREATE TABLE "fineract_0001-mifos-platform-shared-tenants"."timezones" (
    "id" INTEGER NOT NULL DEFAULT nextval('"fineract_0001-mifos-platform-shared-tenants".timezones_id_seq'::regclass),
    "country_code" VARCHAR(2) NOT NULL,
    "timezonename" VARCHAR(100) NOT NULL,
    "comments" VARCHAR(150) DEFAULT NULL::character varying,
    CONSTRAINT "timezones_pkey" PRIMARY KEY ("id")
);
