/[drupal]/contributions/modules/bookmarks/bookmarks.install
ViewVC logotype

Contents of /contributions/modules/bookmarks/bookmarks.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download) (as text)
Mon Jun 23 18:14:44 2008 UTC (17 months ago) by darthclue
Branch: MAIN
CVS Tags: DRUPAL-5--1-0, HEAD
Changes since 1.3: +28 -59 lines
File MIME type: text/x-php
D5 release provided by The Crow
1 <?php
2 function bookmarks_install() {
3 switch ($GLOBALS['db_type']) {
4 case 'mysql':
5 case 'mysqli':
6 $result = db_query("CREATE TABLE {bookmarks} (
7 uid int UNSIGNED NOT NULL,
8 url varchar(128) NOT NULL,
9 title varchar(128) NOT NULL
10 )");
11
12 $result = db_query("ALTER TABLE {bookmarks} ADD INDEX (uid);");
13 break;
14 case 'pgsql':
15 $result = db_query("CREATE TABLE {bookmarks} (
16 uid SERIAL PRIMARY KEY,
17 url VARCHAR(255) NOT NULL,
18 title VARCHAR(255) NOT NULL
19 )");
20 break;
21 }
22 }
23
24 function bookmarks_uninstall() {
25 $result = db_query("DROP TABLE {bookmarks}");
26 }
27
28 ?>

  ViewVC Help
Powered by ViewVC 1.1.2