DrupalBin
Submit Code
About
Recent Posts
admin settings not saving
29 min 41 sec
ago
Code
1 hour 12 min
ago
Code
1 hour 28 min
ago
css path
3 hours 12 min
ago
more
Tags
CCK
drupal
fapi
jquery
menu
module
Panels
php
simpletest
test
theme
views
more tags
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Create new account
Request new password
Log in using OpenID
Cancel OpenID login
Home
Fix for schema doesn't install
View
Download
Fix
This fix will not be saved to the database until you submit.
Summary:
Tags:
Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Source code:
*
<?php // $Id: letters.install,v 1.2 2007/11/07 16:31:47 seanr Exp $ function letters_install() { drupal_install_schema('letters'); } function letters_uninstall() { drupal_uninstall_schema('letters'); } /** * Implementation of hook_schema(). */ function letters_schema() { $schema['letters_newspapers'] = array( 'fields' => array( 'newsid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), 'title' => array('type' => 'varchar', 'not null' => TRUE, 'length' => 255), 'address' => array('type' => 'varchar', 'not null' => FALSE, 'length' => 255), 'city' => array('type' => 'varchar', 'not null' => FALSE, 'length' => 255), 'state' => array('type' => 'varchar', 'not null' => FALSE, 'length' => 2), 'zip' => array('type' => 'varchar', 'not null' => FALSE, 'length' => 10), 'phone' => array('type' => 'varchar', 'not null' => FALSE, 'length' => 15), 'fax' => array('type' => 'varchar', 'not null' => FALSE, 'length' => 15), 'email' => array('type' => 'varchar', 'not null' => FALSE, 'length' => 255), 'homepage' => array('type' => 'varchar', 'not null' => FALSE, 'length' => 255), 'statewide' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0), ), 'indexes' => array( 'letters_zip' => array('zip') ), 'primary key' => array('newsid'), ); }
Syntax highlighting mode:
ActionScript
ColdFusion
Diff
Drupal
Drupal 5
Drupal 6
HTML
Javascript
MySQL
PHP
Python
robots.txt
SQL
Text
Select the syntax highlighting mode to use.