schools.install
Search API
This is the install file for the Schools module. Here, we will handle installing the tables associated with this module.
File
modules/schools/schools.installView source
- <?php
- /**
- * @file
- *
- * This is the install file for the Schools module. Here, we will handle installing the tables
- * associated with this module.
- */
-
-
- /**
- * Implements hook_install
- *
- * This function will create our tables.
- *
- */
- function schools_install() {
-
- $q = "
- CREATE TABLE `schools` (
- `school_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `school_code` varchar(5) NOT NULL,
- `name` varchar(255) NOT NULL,
- PRIMARY KEY (`school_id`),
- KEY `name` (`name`),
- KEY `school_code` (`school_code`)
- ); ";
- db_query($q);
-
- } // hook_install
-
Functions
Name | Description |
---|---|
schools_install | Implements hook_install |