forked from friendica/friendica-addons
tentative database work
This commit is contained in:
parent
9395990ab8
commit
423e016d8e
2 changed files with 5 additions and 0 deletions
|
@ -24,6 +24,7 @@ CREATE TABLE IF NOT EXISTS `retriever_item` (
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS `retriever_resource` (
|
CREATE TABLE IF NOT EXISTS `retriever_resource` (
|
||||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`contact-id` int(10) unsigned NOT NULL DEFAULT '0',
|
||||||
`type` char(255) NULL DEFAULT NULL,
|
`type` char(255) NULL DEFAULT NULL,
|
||||||
`binary` int(1) NOT NULL DEFAULT 0,
|
`binary` int(1) NOT NULL DEFAULT 0,
|
||||||
`url` varchar(800) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
|
`url` varchar(800) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
|
||||||
|
|
|
@ -41,6 +41,10 @@ function retriever_install() {
|
||||||
q("ALTER TABLE `retriever_item` ADD INDEX `item-uid` (`item-uid`)");
|
q("ALTER TABLE `retriever_item` ADD INDEX `item-uid` (`item-uid`)");
|
||||||
Config::set('retriever', 'dbversion', '0.12');
|
Config::set('retriever', 'dbversion', '0.12');
|
||||||
}
|
}
|
||||||
|
/* if (Config::get('retriever', 'dbversion') == '0.12') { */
|
||||||
|
/* q("ALTER TABLE `retriever_resource` ADD COLUMN `contact-id` int(10) unsigned NULL AFTER `id`"); */
|
||||||
|
/* Config::set('retriever', 'dbversion', '0.13'); */
|
||||||
|
/* } */
|
||||||
if (Config::get('retriever', 'dbversion') != '0.12') {
|
if (Config::get('retriever', 'dbversion') != '0.12') {
|
||||||
$schema = file_get_contents(dirname(__file__).'/database.sql');
|
$schema = file_get_contents(dirname(__file__).'/database.sql');
|
||||||
$arr = explode(';', $schema);
|
$arr = explode(';', $schema);
|
||||||
|
|
Loading…
Reference in a new issue