Sziasztok!
Modulom működéséhez plusz táblákra van szükség. Megírtam a mlc.install fájlt, de nem jönnek létre a táblák a modul engedélyezésekor... mi lehet a baj?
/** * Implementation of hook_install() * http://drupal.org/node/323314 */ function mlc_install() { // Create my tables. drupal_install_schema('mlc'); drupal_set_message(t('Module installation script complete.')); } /** * Implementation of hook_uninstall() * http://drupal.org/node/323314 */ function mlc_uninstall() { // Drop my tables. drupal_uninstall_schema('mlc'); drupal_set_message(t('Module uninstallation script complete.')); } /** * http://drupal.org/node/323314 */ function mlc_schema() { $schema = array(); $schema['mlc_group_members'] = array ( 'description' => 'Members of the group contain table', 'fields' => array ( 'nid' => array ( 'description' => 'Node ID: {node} table', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE ), 'uid' => array ( 'description' => 'User ID: {users} table', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE ), 'rid' => array ( 'description' => 'Role ID: {role} table', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE ), 'title' => array ( 'description' => 'Title of the user in community', 'type' => 'varchar', 'length' => 32 ), 'comment' => array ( 'description' => 'Comment for user in community', 'type' => 'varchar', 'length' => 128 ) ), 'indexes' => array ( 'mlc_gm_rid_index' => array( 'rid' ) ), 'primary key' => array( 'nid', 'uid' ) ); $schema['mlc_group_roles'] = array ( 'description' => '', 'fields' => array ( 'gr_id' => array ( 'description' => 'Group role ID', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE ), 'type' => array ( 'description' =>'Node type: {node_type} table', 'type' => 'varchar(64)', 'not null' => TRUE ), 'rid' => array( 'description' => 'Role ID: {role} table', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE ) ), 'indexes' => array ( 'mlc_gr_type_index' => array('type'), 'mlc_gr_rid_index' => array( 'rid' ) ), 'primary key' => array('gr_id') ); $schema['mlc_permission'] = array ( 'description' => '', 'fields' => array ( 'gr_id' => array ( 'description' => 'Group role ID: {mlc_group_roles} table', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE ), 'operation' => array ( 'description' => '', 'type' => 'varchar', 'length' => 128, 'not null' => 'TRUE' ) ), 'indexes' => array ( 'mlc_perm_grid_index' => array( 'gr_id' ) ) ); $schema['mlc_region'] = array ( 'description' => '', 'fields' => array ( 'id' => array ( 'description' => 'Region ID', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE ), 'code' => array ( 'description' => 'Region Code', 'type' => 'varchar', 'length' => 32, 'not null' => TRUE ), 'name' => array ( 'description' => 'Region Name', 'type' => 'varchar', 'length' => 32, 'not null' => TRUE ), 'depth' => array ( 'description' => 'Depth in hierarchy', 'type' => 'int', 'unsigned' => TRUE ), 'parent' => array ( 'description' => "Parent\'s Region ID", 'type' => 'int', 'unsigned' => TRUE ) ), 'primary key' => array( 'id' ), 'indexes' => array ( 'mlc_region_code_index' => array( 'code' ), 'mlc_region_parent_index' => array( 'parent' ), 'mlc_region_depth_index' => array( 'depth' ) ) ); return $schema; }
Szerk: a PHP formázást alkalmaztam. Nagy Gusztáv
Drupal verzió:
Fórum:
devel modul reinstall module
próbáltad uninstallálni a modult és utána újra bekapcsolni?
Palócz István
https://palocz.hu | https://tanarurkerem.hu