source: extensions/AddUsersNotes/maintain.inc.php @ 12447

Revision 12447, 557 bytes checked in by ddtddt, 8 years ago (diff)

[extensions] - AddUsersNotes - First commit

Line 
1<?php
2
3if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
4
5function plugin_install()
6{
7    global $prefixeTable;
8
9if (!defined('USERNOTES_TABLE')) define('USERNOTES_TABLE', $prefixeTable.'user_notes');
10        $query = "CREATE TABLE IF NOT EXISTS ". USERNOTES_TABLE ." (
11user_id SMALLINT( 5 ) UNSIGNED NOT NULL ,
12note VARCHAR( 255 ) NOT NULL ,
13PRIMARY KEY (user_id))DEFAULT CHARSET=utf8;";
14        $result = pwg_query($query);
15       
16}
17
18function plugin_uninstall()
19{
20        global $prefixeTable;
21
22        $q = 'DROP TABLE ' . $prefixeTable . 'user_notes;';
23    pwg_query($q);
24}
25
26
27?>
Note: See TracBrowser for help on using the repository browser.