aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
Diffstat (limited to 'install')
-rw-r--r--install/migrate-mypg.php4
-rw-r--r--install/migrate_mypg_fixseq.sql2
-rw-r--r--install/schema_mysql.sql2
-rw-r--r--install/schema_postgres.sql2
-rw-r--r--install/update.php2
5 files changed, 8 insertions, 4 deletions
diff --git a/install/migrate-mypg.php b/install/migrate-mypg.php
index 10bf1e387..cfd4f681a 100644
--- a/install/migrate-mypg.php
+++ b/install/migrate-mypg.php
@@ -33,7 +33,7 @@ function parse_htconfig($file) {
function get_configtype(array $data) {
if(!isset($data['host'], $data['user'], $data['pass'], $data['data']))
return 'none';
- if($data['type'] == 1)
+ if(@$data['type'] == 1)
return 'pgsql';
return 'mysql';
}
@@ -112,7 +112,7 @@ foreach(array('install','include','mod','view') as $dir) {
}
$cfgfile = '.htconfig.php';
-if($argv[1] == '--resume') {
+if($argc >= 2 && $argv[1] == '--resume') {
if($argc < 4) {
echo "Resume usage {$argv[0]} --resume <table> <row>\n";
exit();
diff --git a/install/migrate_mypg_fixseq.sql b/install/migrate_mypg_fixseq.sql
index 806c5cf31..fde187dc7 100644
--- a/install/migrate_mypg_fixseq.sql
+++ b/install/migrate_mypg_fixseq.sql
@@ -52,4 +52,4 @@
SELECT SETVAL('public.xign_id_seq', COALESCE(MAX(id), 1) ) FROM public.xign;
SELECT SETVAL('public.xlink_xlink_id_seq', COALESCE(MAX(xlink_id), 1) ) FROM public.xlink;
SELECT SETVAL('public.xtag_xtag_id_seq', COALESCE(MAX(xtag_id), 1) ) FROM public.xtag;
-
+ SELECT SETVAL('public.xperm_xp_id_seq', COALESCE(MAX(xp_id), 1) ) FROM public.xperm;
diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql
index 52570898b..226ea2308 100644
--- a/install/schema_mysql.sql
+++ b/install/schema_mysql.sql
@@ -13,6 +13,7 @@ CREATE TABLE IF NOT EXISTS `abook` (
`abook_their_perms` int(11) NOT NULL DEFAULT '0',
`abook_closeness` tinyint(3) unsigned NOT NULL DEFAULT '99',
`abook_rating` int(11) NOT NULL DEFAULT '0',
+ `abook_rating_text` TEXT NOT NULL DEFAULT '',
`abook_created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`abook_updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`abook_connected` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
@@ -1529,6 +1530,7 @@ CREATE TABLE IF NOT EXISTS `xlink` (
`xlink_xchan` char(255) NOT NULL DEFAULT '',
`xlink_link` char(255) NOT NULL DEFAULT '',
`xlink_rating` int(11) NOT NULL DEFAULT '0',
+ `xlink_rating_text` TEXT NOT NULL DEFAULT '',
`xlink_updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`xlink_id`),
KEY `xlink_xchan` (`xlink_xchan`),
diff --git a/install/schema_postgres.sql b/install/schema_postgres.sql
index a1b5a76fb..8539e672d 100644
--- a/install/schema_postgres.sql
+++ b/install/schema_postgres.sql
@@ -7,6 +7,7 @@ CREATE TABLE "abook" (
"abook_their_perms" bigint NOT NULL DEFAULT '0',
"abook_closeness" numeric(3) NOT NULL DEFAULT '99',
"abook_rating" bigint NOT NULL DEFAULT '0',
+ "abook_rating_text" TEXT NOT NULL DEFAULT '',
"abook_created" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00',
"abook_updated" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00',
"abook_connected" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00',
@@ -1142,6 +1143,7 @@ CREATE TABLE "xlink" (
"xlink_xchan" text NOT NULL DEFAULT '',
"xlink_link" text NOT NULL DEFAULT '',
"xlink_rating" bigint NOT NULL DEFAULT '0',
+ "xlink_rating_text" TEXT NOT NULL DEFAULT '',
"xlink_updated" timestamp NOT NULL DEFAULT '0001-01-01 00:00:00',
PRIMARY KEY ("xlink_id")
);
diff --git a/install/update.php b/install/update.php
index a8cecef5a..8cd25f1bf 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1515,7 +1515,7 @@ function update_r1133() {
xp_client varchar( 20 ) NOT NULL DEFAULT '',
xp_channel bigint NOT NULL DEFAULT '0',
xp_perm varchar( 64 ) NOT NULL DEFAULT '',
- PRIMARY_KEY (\"xp_id\") ");
+ PRIMARY KEY (\"xp_id\") )");
$r2 = q("create index \"xp_client\" on xperm (\"xp_client\",
create index \"xp_channel\" on xperm (\"xp_channel\"),
create index \"xp_perm\" on xperm (\"xp_perm\") ");