You are here

formdefaults.install in Form Defaults 8

Installation

File

formdefaults.install
View source
<?php

use Drupal\Core\Database\Database;
use Drupal\formdefaults\Helper\FormDefaultsHelper;

// $Id$

/**
* @file Installation
*/
function formdefaults_install() {
  module_set_weight('formdefaults', 20);
}

/**
 * Implementation of hook_schema
 *
 * @return array Schema definition array.
 */
function formdefaults_schema() {
  $schema['formdefaults_forms'] = array(
    'fields' => array(
      'formid' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
      'formdata' => array(
        'type' => 'text',
      ),
    ),
    'primary key' => array(
      'formid',
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
formdefaults_install @file Installation
formdefaults_schema Implementation of hook_schema