mysql
DROP TABLE IF EXISTS `{$tablename}_goodsattr`;
CREATE TABLE `{$tablename}_goodsattr` (
`id` int(11) NOT NULL AUTO_INCREMENT ,
`uniacid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '规格名称' ,
`goods_id` int(11) NULL DEFAULT NULL ,
`goodsattrgroup_id` int(11) NULL DEFAULT NULL ,
`create_time` int(11) NULL DEFAULT NULL ,
`update_time` int(11) NULL DEFAULT NULL ,
`cloud_group_id` int(11) DEFAULT '0' COMMENT '云规则id',
`store_id` int(11) DEFAULT '0' COMMENT '商家id 0为平台添加公用',
`source` int(11) DEFAULT '0' COMMENT '外部来源 1sgnet ',
`sort` int(11) DEFAULT '0' COMMENT '排序',
PRIMARY KEY (`id`),
KEY `id` (`id`),
KEY `uniacid` (`uniacid`),
KEY `goods_id` (`goods_id`),
KEY `goodsattrgroup_id` (`goodsattrgroup_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
COMMENT='商品规格表'
金仓
CREATE SEQUENCE IF NOT EXISTS "ims_zhyshop_sun_goodsattr2_id_seq" START 1;
DROP TABLE IF EXISTS "ims_zhyshop_sun_goodsattr2";
CREATE TABLE "ims_zhyshop_sun_goodsattr2" (
"id" integer DEFAULT nextval('ims_zhyshop_sun_goodsattr2_id_seq'::regclass),
"uniacid" integer NULL,
"name" character varying(100) NULL,
"goods_id" integer NULL default NULL,
"goodsattrgroup_id" integer NULL,
"cloud_group_id" integer NULL default 0,
"store_id" integer NULL default 0,
"source" integer NULL default 0,
"sort" integer NULL default 0,
"create_time" integer NULL,
"update_time" integer NULL
);
COMMENT ON COLUMN ims_zhyshop_sun_goodsattr2."name" IS '规格名称';
COMMENT ON TABLE "ims_zhyshop_sun_goodsattr2" IS '商品规格表';