Location: PHPKode > projects > Qwench > Qwench-master/db/3.txt
CREATE TABLE `activities` (
  `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  `userid` INTEGER UNSIGNED NOT NULL,
  `activity` INTEGER UNSIGNED NOT NULL,
  `points` INTEGER NOT NULL,
  PRIMARY KEY (`id`)
)
ENGINE = MyISAM
CHARACTER SET utf8 COLLATE utf8_general_ci;


ALTER TABLE `questions` ADD COLUMN `accepted` INTEGER UNSIGNED NOT NULL DEFAULT 0 AFTER `votes`,
 ADD COLUMN `answers` INTEGER UNSIGNED NOT NULL DEFAULT 0 AFTER `accepted`,
 ADD COLUMN `kb` INTEGER UNSIGNED NOT NULL DEFAULT 0 AFTER `answers`;

ALTER TABLE `activities` MODIFY COLUMN `activity` VARCHAR(255) NOT NULL DEFAULT '';

ALTER TABLE `activities` ADD COLUMN `created` DATETIME NOT NULL AFTER `points`;
ALTER TABLE `activities` ADD COLUMN `activityid` INTEGER UNSIGNED NOT NULL AFTER `created`;

ALTER TABLE `users` MODIFY COLUMN `points` INTEGER NOT NULL DEFAULT 0;
Return current item: Qwench