Convert from timestamp to datetime. Datetime is consistent between mysql 4.0x and newer
versions and is faster for date/time computations. Modify object creation methods to specify any time fields that were previously updated with timestamp properties.
This commit is contained in:
@@ -39,7 +39,7 @@ create table appFamily (
|
||||
description text,
|
||||
webPage varchar(100),
|
||||
catId int,
|
||||
submitTime timestamp(14) NOT NULL,
|
||||
submitTime datetime NOT NULL,
|
||||
submitterId int(11) NOT NULL default '0',
|
||||
queued enum('true','false','rejected') NOT NULL default 'false',
|
||||
key(appId)
|
||||
@@ -56,7 +56,7 @@ create table appVersion (
|
||||
description text,
|
||||
maintainer_rating text,
|
||||
maintainer_release text,
|
||||
submitTime timestamp(14) NOT NULL,
|
||||
submitTime datetime NOT NULL,
|
||||
submitterId int(11) NOT NULL default '0',
|
||||
queued enum('true','false','rejected') NOT NULL default 'false',
|
||||
license enum('Retail','Open Source','Freeware','Demo','Shareware'),
|
||||
@@ -93,7 +93,7 @@ create table appBundle (
|
||||
*/
|
||||
create table appHitStats (
|
||||
appHitId int not null auto_increment,
|
||||
time timestamp,
|
||||
time datetime,
|
||||
ip varchar(16),
|
||||
appId int not null,
|
||||
count int,
|
||||
@@ -102,7 +102,7 @@ create table appHitStats (
|
||||
|
||||
create table catHitStats (
|
||||
catHitId int not null auto_increment,
|
||||
time timestamp,
|
||||
time datetime,
|
||||
ip varchar(16),
|
||||
catId int not null,
|
||||
count int,
|
||||
@@ -132,15 +132,15 @@ create table appComments (
|
||||
* links to screenshots and other stuff
|
||||
*/
|
||||
create table appData (
|
||||
id int not null auto_increment,
|
||||
appId int not null,
|
||||
versionId int default 0,
|
||||
type enum('screenshot', 'url', 'bug','downloadurl'),
|
||||
description text,
|
||||
url varchar(255) default NULL,
|
||||
submitTime timestamp(14) NOT NULL,
|
||||
submitterId int(11) NOT NULL default '0',
|
||||
queued enum('true','false','rejected') NOT NULL default 'false',
|
||||
id int not null auto_increment,
|
||||
appId int not null,
|
||||
versionId int default 0,
|
||||
type enum('screenshot', 'url', 'bug','downloadurl'),
|
||||
description text,
|
||||
url varchar(255) default NULL,
|
||||
submitTime datetime NOT NULL,
|
||||
submitterId int(11) NOT NULL default '0',
|
||||
queued enum('true','false','rejected') NOT NULL default 'false',
|
||||
KEY id (id),
|
||||
KEY versionId (versionId)
|
||||
);
|
||||
@@ -152,7 +152,7 @@ create table appData (
|
||||
*/
|
||||
create table appVotes (
|
||||
id int not null auto_increment,
|
||||
time timestamp,
|
||||
time datetime,
|
||||
versionId int not null,
|
||||
userId int not null,
|
||||
slot int not null,
|
||||
@@ -171,7 +171,7 @@ create table appNotes (
|
||||
noteDesc text,
|
||||
versionId int not null,
|
||||
submitterId int not null,
|
||||
submitTime timestamp not null,
|
||||
submitTime datetime not null,
|
||||
key(noteId)
|
||||
);
|
||||
|
||||
@@ -181,7 +181,7 @@ create table appNotes (
|
||||
*/
|
||||
create table sessionMessages (
|
||||
id int not null auto_increment,
|
||||
time timestamp,
|
||||
time datetime,
|
||||
sessionId varchar(32),
|
||||
message text,
|
||||
key(id),
|
||||
|
||||
@@ -6,7 +6,7 @@ CREATE TABLE banner (
|
||||
alt varchar(255),
|
||||
imp int not null,
|
||||
clk int not null,
|
||||
lastmod timestamp,
|
||||
lastmod datetime,
|
||||
|
||||
primary key(id)
|
||||
)
|
||||
|
||||
@@ -9,7 +9,7 @@ create table buglinks (
|
||||
linkId int not null auto_increment,
|
||||
bug_id int not null,
|
||||
versionId int not null,
|
||||
submitTime timestamp(14) NOT NULL,
|
||||
submitTime datetime NOT NULL,
|
||||
submitterId int(11) NOT NULL default '0',
|
||||
queued enum('true','false') NOT NULL default 'false',
|
||||
key(linkId),
|
||||
|
||||
@@ -6,13 +6,13 @@ drop table if exists distributions;
|
||||
* Distributions table.
|
||||
*/
|
||||
create table distributions (
|
||||
distributionId int not null auto_increment,
|
||||
name varchar(255) default NULL,
|
||||
url varchar(255) default NULL,
|
||||
submitTime timestamp(14) NOT NULL,
|
||||
submitterId int(11) NOT NULL default '0',
|
||||
queued enum('true','false','rejected') NOT NULL default 'false',
|
||||
distributionId int not null auto_increment,
|
||||
name varchar(255) default NULL,
|
||||
url varchar(255) default NULL,
|
||||
submitTime datetime NOT NULL,
|
||||
submitterId int(11) NOT NULL default '0',
|
||||
queued enum('true','false','rejected') NOT NULL default 'false',
|
||||
key(distributionId),
|
||||
index(name)
|
||||
index(name)
|
||||
);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ create table appMonitors (
|
||||
monitorId int not null auto_increment,
|
||||
appId int not null,
|
||||
versionId int not null,
|
||||
submitTime timestamp(14) NOT NULL,
|
||||
submitTime datetime NOT NULL,
|
||||
userId int(11) NOT NULL default '0',
|
||||
key(monitorId),
|
||||
index(appid),
|
||||
|
||||
@@ -8,6 +8,6 @@ CREATE TABLE session_list (
|
||||
ip varchar(64) default NULL,
|
||||
data text,
|
||||
messages text,
|
||||
stamp timestamp(14) NOT NULL,
|
||||
stamp datetime NOT NULL,
|
||||
PRIMARY KEY (session_id)
|
||||
) TYPE=MyISAM;
|
||||
|
||||
@@ -18,7 +18,7 @@ create table testResults (
|
||||
runs enum('Yes','No','Not Installable') NOT NULL default 'Yes',
|
||||
testedRating enum('Platinum','Gold','Silver','Bronze','Garbage') NOT NULL,
|
||||
comments text,
|
||||
submitTime timestamp(14) NOT NULL,
|
||||
submitTime datetime NOT NULL,
|
||||
submitterId int(11) NOT NULL default '0',
|
||||
queued enum('true','false','rejected') NOT NULL default 'false',
|
||||
key(testingId)
|
||||
|
||||
@@ -3,13 +3,13 @@ use apidb;
|
||||
drop table if exists user_list;
|
||||
|
||||
create table user_list (
|
||||
stamp timestamp not null,
|
||||
stamp datetime not null,
|
||||
userid int not null auto_increment,
|
||||
password text not null,
|
||||
realname text not null,
|
||||
email varchar(255) not null,
|
||||
created datetime not null,
|
||||
inactivity_warn_stamp timestamp not null, /* the time we warned the user */
|
||||
inactivity_warn_stamp datetime not null, /* the time we warned the user */
|
||||
inactivity_warned enum('true','false') NOT NULL default 'false', /* if true, we warned the user */
|
||||
CVSrelease text,
|
||||
unique key(userid),
|
||||
|
||||
Reference in New Issue
Block a user