журнал (shhh) wrote in changelog,
журнал
shhh
changelog

[ljcom] r12377: LJSUP-13154: DB schema for accounts and ...

Committer: nnikulochkina
LJSUP-13154: DB schema for accounts and blockings
U   trunk/bin/upgrading/update-db-local.pl
Modified: trunk/bin/upgrading/update-db-local.pl
===================================================================
--- trunk/bin/upgrading/update-db-local.pl	2012-07-31 09:31:08 UTC (rev 12376)
+++ trunk/bin/upgrading/update-db-local.pl	2012-07-31 09:37:32 UTC (rev 12377)
@@ -1881,6 +1881,72 @@
 )
 EOC
 
+register_tablecreate('blocking', <<'EOC');
+CREATE TABLE `blocking` (
+  `blid` int(11) unsigned NOT NULL AUTO_INCREMENT,
+  `userid` int(11) unsigned NOT NULL,
+  `rcptid` int(11) unsigned NOT NULL,
+  `accid` int(11) NOT NULL,
+  `qty` int(10) unsigned NOT NULL,
+  `purpose` char(1) DEFAULT NULL,
+  `obj` varchar(45) DEFAULT NULL,
+  `status` char(1) NOT NULL,
+  `payid` int(10) unsigned NOT NULL DEFAULT '0',
+  `timestamp` int(11) NOT NULL,
+  `blockedtill` int(11) NOT NULL DEFAULT '0',
+  PRIMARY KEY (`blid`),
+  KEY `rcptid` (`rcptid`),
+  KEY `accid`  (`accid`),
+  KEY `blockedtill` (`blockedtill`)
+)
+EOC
+
+register_tablecreate('user_account', <<'EOC');
+CREATE TABLE `user_account` (
+  `accid` int(11) NOT NULL AUTO_INCREMENT,
+  `userid` int(11) NOT NULL DEFAULT '0',
+  `balance` bigint(20) NOT NULL DEFAULT '0',
+  `blocked` bigint(20) NOT NULL DEFAULT '0', 
+  `purpose` char(1) DEFAULT NULL,
+  `obj` varchar(25) DEFAULT NULL,
+  `inactive` tinyint(1) unsigned NOT NULL DEFAULT '0',
+  PRIMARY KEY (`accid`),
+  KEY `userid` (`userid`)
+)
+EOC
+
+register_tablecreate('user_account_history', <<'EOC');
+CREATE TABLE `user_account_history` (
+  `logid` int(11) NOT NULL AUTO_INCREMENT,
+  `userid` int(11) NOT NULL default '0',
+  `accid` int(11) NOT NULL default '0',
+  `action` char(1) NOT NULL DEFAULT '',
+  `qty` bigint(20) NOT NULL,
+  `timestamp` int(11) NOT NULL DEFAULT '0',
+  PRIMARY KEY  (`logid`),
+  KEY `userid` (`userid`, `timestamp`),
+  KEY `accid`  (`accid`, `timestamp`)
+)
+EOC
+
+register_tablecreate('blocking_history', <<'EOC');
+CREATE TABLE `blocking_history` (
+  `logid` int(11) NOT NULL AUTO_INCREMENT,
+  `userid` int(11) NOT NULL default '0',
+  `blid` int(11) NOT NULL default '0',
+  `rcptid` int(11) NOT NULL default '0',
+  `accid` int(11) NOT NULL default '0',
+  `action` char(1) NOT NULL DEFAULT '',
+  `qty` bigint(20) NOT NULL,
+  `timestamp` int(11) NOT NULL DEFAULT '0',
+  PRIMARY KEY  (`logid`),
+  KEY `userid` (`userid`,`timestamp`),
+  KEY `rcptid` (`rcptid`,`timestamp`),
+  KEY `accid`  (`accid`,`timestamp`)
+)
+EOC
+
+
 register_tabledrop('tmp_contributed');
 
 # *************************************************************

Tags: ljcom, nikulochkina, nnikulochkina, pl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments