5 * Implementation of hook_install()
7 * This will automatically install the database tables for the TinyMCE module for both the MySQL and PostgreSQL databases.
9 * If you are using another database, you will have to install the tables by hand, using the queries below as a reference.
11 * Note that the curly braces around table names are a drupal-specific feature to allow for automatic database table prefixing,
12 * and will need to be removed.
14 function tinymce_install() {
15 switch ($GLOBALS['db_type']) {
18 db_query("CREATE TABLE {tinymce_settings} (
19 name varchar(128) NOT NULL default '',
22 ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
24 db_query("CREATE TABLE {tinymce_role} (
25 name varchar(128) NOT NULL default '',
26 rid tinyint(3) unsigned NOT NULL default '0',
27 PRIMARY KEY (name,rid)
28 ) /*!40100 DEFAULT CHARACTER SET utf8 */;");
32 db_query("CREATE TABLE {tinymce_settings} (
33 name varchar(128) NOT NULL default '',
38 db_query("CREATE TABLE {tinymce_role} (
39 name varchar(128) NOT NULL default '',
40 rid smallint NOT NULL default '0',
41 PRIMARY KEY (name,rid)
47 function tinymce_update_1() {
48 return _system_update_utf8(array('tinymce_settings', 'tinymce_role'));
52 * Implementation of hook_uninstall()
54 function tinymce_uninstall() {
55 db_query('DROP TABLE {tinymce_settings}');
56 db_query('DROP TABLE {tinymce_role}');