Commit 6bdf04b5 authored by Leigh Stoller's avatar Leigh Stoller

Add default values for various columns that were created without them,

when mysql used to do that for columns.
parent 06799830
......@@ -2805,9 +2805,10 @@ last_net_act,last_cpu_act,last_ext_act);
4.9: Add a 'global_vtypes' table to allow admins to create vtypes that apply
to all users:
create table global_vtypes (vtype varchar(30) primary key, \
weight float not null default 0.5, \
types text not null default "");
create table global_vtypes \
(vtype varchar(30) not null default '' primary key, \
weight float not null default 0.5, \
types text not null default "");
4.10: New inner_elab roles to support separate ops and fs nodes.
While I'm here, add future roles for distinguishing boss and the router.
......@@ -3029,7 +3030,7 @@ last_net_act,last_cpu_act,last_ext_act);
4.25: Modify tables for the logging subsystem
alter table log
modify level tinyint(2) not null,
modify level tinyint(2) not null default '0',
add sublevel tinyint(2) NOT NULL default 0 after level,
modify type
enum('normal','entering','exiting','thecause','extra','summary')
......@@ -3037,7 +3038,8 @@ last_net_act,last_cpu_act,last_ext_act);
alter table scripts change name script_name varchar(24) NOT NULL default '';
alter table priorities change name priority_name varchar(8) NOT NULL;
alter table priorities change name priority_name varchar(8) \
NOT NULL default '';
4.26: Add tables for the checkup_daemon.
......@@ -3182,12 +3184,12 @@ last_net_act,last_cpu_act,last_ext_act);
structured fashion:
CREATE TABLE errors (
session int unsigned NOT NULL,
stamp int unsigned NOT NULL,
exptidx int NOT NULL,
script smallint(3) NOT NULL,
cause varchar(16) NOT NULL,
confidence float NOT NULL,
session int(1) unsigned NOT NULL default '0',
stamp int(10) unsigned NOT NULL default '0',
exptidx int(11) NOT NULL default '0',
script smallint(3) NOT NULL default '0',
cause varchar(16) NOT NULL default '',
confidence float NOT NULL default '0',
mesg text NOT NULL,
primary key (session)
);
......@@ -3199,14 +3201,14 @@ last_net_act,last_cpu_act,last_ext_act);
add log_session int unsigned;
CREATE TABLE causes (
cause varchar(16) NOT NULL,
cause_desc varchar(32) NOT NULL,
cause varchar(16) NOT NULL default '',
cause_desc varchar(32) NOT NULL default '',
primary key (cause),
unique key (cause_desc)
);
ALTER TABLE log
change cause cause varchar(16) NOT NULL,
change cause cause varchar(16) NOT NULL default '',
change pidx exptidx int NOT NULL default '0';
INSERT INTO exported_tables values ('causes');
......
......@@ -2,30 +2,30 @@
CREATE TABLE log (
seq int unsigned NOT NULL auto_increment,
stamp int unsigned NOT NULL,
stamp int(10) unsigned NOT NULL default '0',
pidx int NOT NULL, -- unique project id
uid int default NULL, -- numeric user id
session int unsigned NOT NULL, -- session id (1)
invocation int unsigned NOT NULL, -- invocation id - unique id for a
session int(10) unsigned NOT NULL default '0', -- session id (1)
invocation int(10) unsigned NOT NULL default '0', -- invocation id - unique id for a
-- particular execution of a script (1)
parent int unsigned NOT NULL, -- invocation id of the parent script
script smallint(3) NOT NULL, -- numeric id for the script name
level smallint(2) NOT NULL , -- depth of the script in the call chain
priority smallint(3) NOT NULL, -- syslog priority
inferred tinyint(1) NOT NULL, -- 0 - log created with tblog
parent int(10) unsigned NOT NULL default '0', -- invocation id of the parent script
script smallint(3) NOT NULL default '0', -- numeric id for the script name
level smallint(2) NOT NULL default '0', -- depth of the script in the call chain
priority smallint(3) NOT NULL default '0', -- syslog priority
inferred tinyint(1) NOT NULL default '0', -- 0 - log created with tblog
-- 1 - log created by catching a die or warn
-- 2 - log created with a normal print and
-- given the non-default priority
-- 3 - log created with a normal print and
-- given the default priority
cause varchar(32) NOT NULL, -- string identifying the "cause" of the error
cause varchar(32) NOT NULL default '', -- string identifying the "cause" of the error
type enum('normal','entering','exiting','thecause')
NOT NULL default 'normal',-- type of error:
-- normal: normal error generated by tblog
-- entering: auto gen when a script starts
-- exiting: auto gen when a script exists (2)
-- thecause: created by tblog_find_error
relevant tinyint(1) NOT NULL, -- if the error was considered relevent
relevant tinyint(1) NOT NULL default '0', -- if the error was considered relevent
-- by tblog_find_error
mesg text NOT NULL, -- the text of the message
PRIMARY KEY (seq),
......@@ -55,8 +55,8 @@ CREATE TABLE scripts (
);
CREATE TABLE priorities (
priority smallint(3) NOT NULL,
name varchar(8) NOT NULL,
priority smallint(3) NOT NULL default '0',
name varchar(8) NOT NULL default '',
primary key (priority),
unique key (name)
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment