--
--  メーカー
--      t_maker
--

CREATE TABLE t_maker
(
    MakerCd serial NOT NULL,        -- PriKey
    MakerNm character varying(256),
    MakerNmKana character varying(256),
    Comment character varying(1024),
    RecommendDiv integer,
    ShopDiv integer,

    DelFlg boolean,
    AddDate timestamp without time zone,
    UpdDate timestamp without time zone,
    UpdUsrNm character varying(60),
    UpdPcNm character varying(60),
    UpdCnt integer,

    PRIMARY KEY(MakerCd)
);

-- シリアル初期値
SELECT setval('t_maker_MakerCd_seq', 10000);


-- トリガ
CREATE TRIGGER trigger_master_stamp
  BEFORE INSERT OR UPDATE
  ON t_maker
  FOR EACH ROW
  EXECUTE PROCEDURE g_master_stamp();
