
create table `img_session` (
  `sid`		VARCHAR(32)	NOT NULL DEFAULT '',
  `uid`		INT		NOT NULL DEFAULT 0,
  `ipaddr`	VARCHAR(64)	NOT NULL DEFAULT '',
  PRIMARY KEY (`sid`),
  INDEX `uid` (`uid`)
);

create table `img_image` (
  `iid`		INT(12)		NOT NULL AUTO_INCREMENT,
  `uid`		INT(12)		NOT NULL DEFAULT 0,
  `location`	VARCHAR(512)	NOT NULL DEFAULT '',
  `name`	VARCHAR(256)	NOT NULL DEFAULT '',
  `meta`	TEXT		NOT NULL DEFAULT '{}',
  `created`	TIMESTAMP	NOT NULL DEFAULT CURRENT_TIMESTAMP(),
  `tags`	TEXT		NOT NULL DEFAULT '[]',
  PRIMARY KEY (`iid`),
  INDEX `uid` (`uid`)
);
