t('signwriter table'), 'fields' => array( 'id' => array( 'description' => 'the primary identifier of the schema', 'type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE ), 'name' => array( 'description' => 'the name of the schema', 'type' => 'varchar', 'length' => 128 ), 'pattern' => array( 'description' => 'the signwriter pattern', 'type' => 'varchar', 'length' => 128 ), 'fontfile' => array( 'description' => 'the name of the font, without ttf', 'type' => 'varchar', 'length' => 128 ), 'fontsize' => array( 'description' => 'the size of the font', 'type' => 'int', 'unsigned' => TRUE, 'default' => 20 ), 'imagetype' => array( 'description' => 'the type of the image', 'type' => 'varchar', 'length' => 8, 'not null' => TRUE, 'default' => 'gif' ), 'background' => array( 'description' => 'background color', 'type' => 'varchar', 'length' => 6, 'default' => 'ffffff' ), 'foreground' => array( 'description' => 'foreground color', 'type' => 'varchar', 'length' => 6, 'default' => '000000' ), 'transparent' => array( 'description' => 'transparent image', 'type' => 'int', 'not null' => TRUE, 'default' => 1 ), 'bgimage' => array( 'description' => 'background image', 'type' => 'varchar', 'length' => 128 ), 'width' => array( 'description' => 'width of the image', 'type' => 'int' ), 'height' => array( 'description' => 'height of the image', 'type' => 'int' ), 'maxwidth' => array( 'description' => 'maximum width of the image', 'type' => 'int' ), 'textalign' => array( 'description' => 'alignment of text within the image', 'type' => 'varchar', 'length' => 32 ), 'xoffset' => array( 'description' => 'x offset of the text within the image', 'type' => 'int' ), 'yoffset' => array( 'description' => 'y offset of the text within the image', 'type' => 'int' ), 'multiline' => array( 'description' => 'is multiline functionality enabled', 'type' => 'int', 'not null' => TRUE, 'default' => 1 ), 'drop_shadow' => array( 'description' => 'are drop shadows on or off', 'type' => 'int', 'not null' => TRUE, 'default' => 0 ), 'shadow_color' => array( 'description' => 'are drop shadows on or off', 'type' => 'varchar', 'length' => 6, 'default' => 'd2d2d2' ), 'shadow_xoffset' => array( 'description' => 'x offset of shadow from actual text', 'type' => 'int', 'default' => 5 ), 'shadow_yoffset' => array( 'description' => 'y offset of shadow from actual text', 'type' => 'int' ) ), 'indexes' => array( 'name' => array('name') ), 'primary key' => array('id'), ); return $schema; } function signwriter_update_6000() { $ret = array(); variable_del('cachedir'); variable_del('fontpath'); $ret[] = update_sql("ALTER TABLE {signwriter} CHANGE fontsize fontsize int unsigned default '20'"); $ret[] = update_sql("ALTER TABLE {signwriter} CHANGE background background varchar(6) default 'ffffff'"); $ret[] = update_sql("ALTER TABLE {signwriter} CHANGE foreground foreground varchar(6) default '000000'"); $ret[] = update_sql("ALTER TABLE {signwriter} CHANGE shadow_color shadow_color varchar(6) default 'd2d2d2'"); cache_clear_all(); menu_rebuild(); drupal_set_message(t('The signwriter module now cleans up the generated image files once a week. Files generated by previous versions have to be removed manually from the old signwriter cache directory. The new one is located within the files directory.')); return $ret; }