Browse Source

Database can now be automatically updated

pull/404/head
Domovoy 9 years ago
parent
commit
c052c6afca
3 changed files with 10 additions and 2 deletions
  1. +1
    -1
      boot.php
  2. +1
    -0
      database.sql
  3. +8
    -1
      update.php

+ 1
- 1
boot.php View File

@ -12,7 +12,7 @@ require_once('include/cache.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_VERSION', '3.0.1412' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1153 );
define ( 'DB_UPDATE_VERSION', 1154 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );


+ 1
- 0
database.sql View File

@ -456,6 +456,7 @@ CREATE TABLE IF NOT EXISTS `hook` (
`hook` char(255) NOT NULL,
`file` char(255) NOT NULL,
`function` char(255) NOT NULL,
`priority` int(11) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;


+ 8
- 1
update.php View File

@ -1,6 +1,6 @@
<?php
define( 'UPDATE_VERSION' , 1153 );
define( 'UPDATE_VERSION' , 1154 );
/**
*
@ -1337,3 +1337,10 @@ function update_1152() {
return UPDATE_SUCCESS;
}
function update_1153() {
$r = q("ALTER TABLE `hook` ADD `priority` INT(11) UNSIGNED NOT NULL DEFAULT '0'");
if(!$r) return UPDATE_FAILED;
return UPDATE_SUCCESS;
}

Loading…
Cancel
Save