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