CREATE TABLE goukei ( turisenn float8 default '0' not null, azukari float8 default '0' not null, nyuukinn float8 default '0' not null, shukkinn float8 default '0' not null, zeikinn float8 default '0' not null, uchizei float8 default '0' not null, hikazei float8 default '0' not null, uchizeitaishou float8 default '0' not null, sotozeitaishou float8 default '0' not null, goukeiid int4 default '0' not null, hikazeiwaribiki float8 default '0' not null, uchizeitaishouwaribiki float8 default '0' not null, sotozeitaishouwaribiki float8 default '0' not null, point float8 default '0' not null, kakinn float8 default '0' not null, waribikiritsu int2 default '0' not null ); CREATE TABLE kakeurishori ( kakeurishoriid serial primary key, maindate timestamp, tanntoushaid int4 default '0' not null, nyushukkaid int4 default '0' not null ); CREATE TABLE sethannbai ( sethannbaiid serial primary key, shouhinnid int4 default '0' not null, groupid int4 default '0' not null, groupmei varchar(50), nebikigaku float8 default '0' not null, barcodeno varchar(50), priority int4 default '0' not null ); CREATE TABLE kokyaku ( kokyakuid serial primary key, cardid varchar(50), nyuukaidate timestamp, kokyakumei varchar(50), kokyakumeikana varchar(50), email varchar(50), tel varchar(50), fax varchar(50), postcode varchar(50), address varchar(100), birthday timestamp, sex varchar(50), pointstartdate timestamp, bunnrui varchar(50), memo1 varchar(50), memo2 varchar(50), yuukoukigenn timestamp, nebiki int4 default '0' not null, pointtaishou int2 default '0' not null ); CREATE TABLE nyushukkamain ( nyushukkaid serial primary key, category varchar(50), maindate timestamp, shainnid int4 default '0' not null, kionn int4 default '0' not null, dennpyouno int4 default '0' not null, olddennpyouno int4 default '0' not null, kokyakuid int4 default '0' not null, tennki varchar(50), sex varchar(50), age int4 default '0' not null, registerno int4 default '0' not null, shiiresakiid int4 default '0' not null, idounyushukkotennpo int4 default '0' not null, subcategoryid int4 default '0' not null, ichijihojigyoumuuketoridate timestamp, ichibunyuukinn int2 default '0' not null, kyakusuu int4 default '0' not null, ichijihojigyoumuhannbai int2 default '0' not null, seisannno int4 default '0' not null, koumoku varchar(50), memo varchar(50) ); CREATE TABLE nyushukkasub ( nyushukkaid int4 default '0' not null, shouhinnid int4 default '0' not null, shouhinnmei varchar(100), nyuukasuu float8 default '0' not null, shukkasuu float8 default '0' not null, shoukei float8 default '0' not null, nebikigaku float8 default '0' not null, tanaoroshisuu float8 default '0' not null ); CREATE TABLE sethannbaisub ( nyushukkaid int4 default '0' not null, groupid int4 default '0' not null, nyuukasuu float8 default '0' not null, shukkasuu float8 default '0' not null, shoukei float8 default '0' not null, nebikigaku float8 default '0' not null ); CREATE TABLE seisann ( souuriagekosuu float8 default '0' not null, souuriagekinngaku float8 default '0' not null, jyunnuriagekennsuu float8 default '0' not null, jyunnuriagekinngaku float8 default '0' not null, waribikigoukei float8 default '0' not null, nebikigoukei float8 default '0' not null, uchizeikinngaku float8 default '0' not null, uchizeitaishou float8 default '0' not null, sotozeikinngaku float8 default '0' not null, sotozeitaishou float8 default '0' not null, hikazeitaishou float8 default '0' not null, hennpinnkennsuu float8 default '0' not null, hennpinnkinngaku float8 default '0' not null, gennkinnuriagekennsuu float8 default '0' not null, gennkinnuriagekinngaku float8 default '0' not null, kakeuriagekennsuu float8 default '0' not null, kakeuriagekinngaku float8 default '0' not null, carduriagekennsuu float8 default '0' not null, carduriagekennsuu1 float8 default '0' not null, carduriagekennsuu2 float8 default '0' not null, carduriagekennsuu3 float8 default '0' not null, carduriagekennsuu4 float8 default '0' not null, carduriagekennsuu5 float8 default '0' not null, carduriagekennsuu6 float8 default '0' not null, carduriagekennsuu7 float8 default '0' not null, carduriagekennsuu8 float8 default '0' not null, carduriagekennsuu9 float8 default '0' not null, carduriagekennsuu10 float8 default '0' not null, carduriagekennsuu11 float8 default '0' not null, carduriagekennsuu12 float8 default '0' not null, carduriagekennsuu13 float8 default '0' not null, carduriagekennsuu14 float8 default '0' not null, carduriagekennsuu15 float8 default '0' not null, carduriagekennsuu16 float8 default '0' not null, carduriagekennsuu17 float8 default '0' not null, carduriagekennsuu18 float8 default '0' not null, carduriagekennsuu19 float8 default '0' not null, carduriagekennsuu20 float8 default '0' not null, carduriagekinngaku float8 default '0' not null, carduriagekinngaku1 float8 default '0' not null, carduriagekinngaku2 float8 default '0' not null, carduriagekinngaku3 float8 default '0' not null, carduriagekinngaku4 float8 default '0' not null, carduriagekinngaku5 float8 default '0' not null, carduriagekinngaku6 float8 default '0' not null, carduriagekinngaku7 float8 default '0' not null, carduriagekinngaku8 float8 default '0' not null, carduriagekinngaku9 float8 default '0' not null, carduriagekinngaku10 float8 default '0' not null, carduriagekinngaku11 float8 default '0' not null, carduriagekinngaku12 float8 default '0' not null, carduriagekinngaku13 float8 default '0' not null, carduriagekinngaku14 float8 default '0' not null, carduriagekinngaku15 float8 default '0' not null, carduriagekinngaku16 float8 default '0' not null, carduriagekinngaku17 float8 default '0' not null, carduriagekinngaku18 float8 default '0' not null, carduriagekinngaku19 float8 default '0' not null, carduriagekinngaku20 float8 default '0' not null, shouhinnkennuriagekennsuu float8 default '0' not null, shouhinnkennuriagekennsuu1 float8 default '0' not null, shouhinnkennuriagekennsuu2 float8 default '0' not null, shouhinnkennuriagekennsuu3 float8 default '0' not null, shouhinnkennuriagekennsuu4 float8 default '0' not null, shouhinnkennuriagekennsuu5 float8 default '0' not null, shouhinnkennuriagekennsuu6 float8 default '0' not null, shouhinnkennuriagekennsuu7 float8 default '0' not null, shouhinnkennuriagekennsuu8 float8 default '0' not null, shouhinnkennuriagekennsuu9 float8 default '0' not null, shouhinnkennuriagekennsuu10 float8 default '0' not null, shouhinnkennuriagekennsuu11 float8 default '0' not null, shouhinnkennuriagekennsuu12 float8 default '0' not null, shouhinnkennuriagekennsuu13 float8 default '0' not null, shouhinnkennuriagekennsuu14 float8 default '0' not null, shouhinnkennuriagekennsuu15 float8 default '0' not null, shouhinnkennuriagekennsuu16 float8 default '0' not null, shouhinnkennuriagekennsuu17 float8 default '0' not null, shouhinnkennuriagekennsuu18 float8 default '0' not null, shouhinnkennuriagekennsuu19 float8 default '0' not null, shouhinnkennuriagekennsuu20 float8 default '0' not null, shouhinnkennuriagekinngaku float8 default '0' not null, shouhinnkennuriagekinngaku1 float8 default '0' not null, shouhinnkennuriagekinngaku2 float8 default '0' not null, shouhinnkennuriagekinngaku3 float8 default '0' not null, shouhinnkennuriagekinngaku4 float8 default '0' not null, shouhinnkennuriagekinngaku5 float8 default '0' not null, shouhinnkennuriagekinngaku6 float8 default '0' not null, shouhinnkennuriagekinngaku7 float8 default '0' not null, shouhinnkennuriagekinngaku8 float8 default '0' not null, shouhinnkennuriagekinngaku9 float8 default '0' not null, shouhinnkennuriagekinngaku10 float8 default '0' not null, shouhinnkennuriagekinngaku11 float8 default '0' not null, shouhinnkennuriagekinngaku12 float8 default '0' not null, shouhinnkennuriagekinngaku13 float8 default '0' not null, shouhinnkennuriagekinngaku14 float8 default '0' not null, shouhinnkennuriagekinngaku15 float8 default '0' not null, shouhinnkennuriagekinngaku16 float8 default '0' not null, shouhinnkennuriagekinngaku17 float8 default '0' not null, shouhinnkennuriagekinngaku18 float8 default '0' not null, shouhinnkennuriagekinngaku19 float8 default '0' not null, shouhinnkennuriagekinngaku20 float8 default '0' not null, nyuukinn float8 default '0' not null, shukkinn float8 default '0' not null, gennkinnaridaka float8 default '0' not null, regiaridaka float8 default '0' not null, gennkinnkabusoku float8 default '0' not null, currency1yen int4 default '0' not null, currency5yen int4 default '0' not null, currency10yen int4 default '0' not null, currency50yen int4 default '0' not null, currency100yen int4 default '0' not null, currency500yen int4 default '0' not null, currency1000yen int4 default '0' not null, currency2000yen int4 default '0' not null, currency5000yen int4 default '0' not null, currency10000yen int4 default '0' not null, checkdate timestamp, seisannid serial primary key, kakinngaku float8 default '0' not null, ryougaekaisuu float8 default '0' not null, registerno varchar(50), memo varchar(255), seisannno int4 default '0' not null ); CREATE TABLE shainn ( shainnid serial primary key, shainnmei varchar(50), shainnmeikana varchar(50), barcodeno varchar(50), password varchar(50) ); CREATE TABLE shiiresaki ( shiiresakiid serial primary key, shiiresakimei varchar(100), shiiresakimeikana varchar(100), email varchar(50), tel varchar(50), fax varchar(50), postcode varchar(50), address varchar(50), memo1 varchar(50), memo2 varchar(50), memo3 varchar(50) ); CREATE TABLE shouhinn ( shouhinnid serial primary key, shouhinnmei varchar(100), zaikokijyunn float8 default '0' not null, shiirekakaku float8 default '0' not null, shouhinnmeikana varchar(100), memo varchar(50), barcodeno varchar(50), shortcutkey int2 default '0' not null, hannbaikakaku float8 default '0' not null, bumonn varchar(50), shiiresaki varchar(50), tax varchar(50), kosuutanni varchar(50), tourokudate timestamp, memo1 varchar(50), memo2 varchar(50), memo3 varchar(50), memo4 varchar(50), memo5 varchar(50), tennpono int4 default '0' not null, nebikiwaribikitaishou int2 default '0' not null, pointtaishou int2 default '0' not null, macrofilepath varchar(50), picture bytea, picturename varchar(50) );