function schools_install

7.x schools.install schools_install()
6.x schools.install schools_install()

Implements hook_install

This function will create our tables.

File

modules/schools/schools.install, line 16
This is the install file for the Schools module. Here, we will handle installing the tables associated with this module.

Code

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);

}