summaryrefslogtreecommitdiff
path: root/modules/trigger
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-10-05 14:43:26 +0000
committerDries Buytaert <dries@buytaert.net>2007-10-05 14:43:26 +0000
commit39706e3c51cf206ca6669bbb7a090d2f7d394591 (patch)
tree9286ccd302d526ea8a1de799081356fcc77c28a3 /modules/trigger
parentd568128b9f7a0181b31e9baa087022e892352ea7 (diff)
downloadbrdo-39706e3c51cf206ca6669bbb7a090d2f7d394591.tar.gz
brdo-39706e3c51cf206ca6669bbb7a090d2f7d394591.tar.bz2
- Patch #150245 by webchick, bjaspan, ralf, Arancaytar et al: move the .schema files into .install files to prevent mistakes.
Diffstat (limited to 'modules/trigger')
-rw-r--r--modules/trigger/trigger.install17
-rw-r--r--modules/trigger/trigger.schema15
2 files changed, 17 insertions, 15 deletions
diff --git a/modules/trigger/trigger.install b/modules/trigger/trigger.install
index 13dd08ae1..14aaf2edd 100644
--- a/modules/trigger/trigger.install
+++ b/modules/trigger/trigger.install
@@ -19,3 +19,20 @@ function trigger_uninstall() {
// Remove tables.
drupal_uninstall_schema('trigger');
}
+
+/**
+ * Implementation of hook_schema().
+ */
+function trigger_schema() {
+ $schema['trigger_assignments'] = array(
+ 'fields' => array(
+ 'hook' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
+ 'op' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
+ 'aid' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
+ 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
+ ),
+ 'primary key' => array('hook', 'op', 'aid'),
+ );
+ return $schema;
+}
+
diff --git a/modules/trigger/trigger.schema b/modules/trigger/trigger.schema
deleted file mode 100644
index 1b06b97d3..000000000
--- a/modules/trigger/trigger.schema
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-// $Id$
-
-function trigger_schema() {
- $schema['trigger_assignments'] = array(
- 'fields' => array(
- 'hook' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
- 'op' => array('type' => 'varchar', 'length' => 32, 'not null' => TRUE, 'default' => ''),
- 'aid' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, 'default' => ''),
- 'weight' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
- ),
- 'primary key' => array('hook', 'op', 'aid'),
- );
- return $schema;
-}