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

Last change on this file since 22091 was 12447, checked in by ddtddt, 13 years ago

[extensions] - AddUsersNotes - First commit

File size: 557 bytes
RevLine 
[12447]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.