" content_id I4 NOTNULL PRIMARY, structure_id I4 NOTNULL PRIMARY CONSTRAINT ' , CONSTRAINT `pigeonholes_content_ref` FOREIGN KEY (`content_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content`( `content_id` )' ", 'pigeonhole_members' => " parent_id I4 NOTNULL PRIMARY, content_id I4 NOTNULL PRIMARY CONSTRAINT ' , CONSTRAINT `pigeonhole_members_parent_ref` FOREIGN KEY (`parent_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content`( `content_id` ) , CONSTRAINT `pigeonhole_members_content_ref` FOREIGN KEY (`content_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content`( `content_id` )' ", ]; global $gBitInstaller; foreach( array_keys( $tables ) AS $tableName ) { $gBitInstaller->registerSchemaTable( PIGEONHOLES_PKG_NAME, $tableName, $tables[$tableName] ); } $gBitInstaller->registerPackageInfo( PIGEONHOLES_PKG_NAME, [ 'description' => "A Categorisation system that makes it easy to keep an overview of your data. Has a simple, yet powerful interface for categorising multiple pages at once.", 'license' => 'LGPL', ] ); // ### Sequences $sequences = [ 'pigeonholes_id_seq' => [ 'start' => 1 ], ]; $gBitInstaller->registerSchemaSequences( PIGEONHOLES_PKG_NAME, $sequences ); // ### Default Preferences $gBitInstaller->registerPreferences( PIGEONHOLES_PKG_NAME, [ [ PIGEONHOLES_PKG_NAME, 'pigeonholes_display_members','y' ], [ PIGEONHOLES_PKG_NAME, 'pigeonholes_limit_member_number','100' ], [ PIGEONHOLES_PKG_NAME, 'pigeonholes_list_style','table' ], [ PIGEONHOLES_PKG_NAME, 'pigeonholes_menu_text', 'Categories' ], ] ); // ### Default UserPermissions $gBitInstaller->registerUserPermissions( PIGEONHOLES_PKG_NAME, [ [ 'p_pigeonholes_view', 'Can view pigeonholes', 'basic', PIGEONHOLES_PKG_NAME ], [ 'p_pigeonholes_insert_member', 'Can insert content into an existing pigeonhole', 'registered', PIGEONHOLES_PKG_NAME ], [ 'p_pigeonholes_update', 'Can update pigeonholes', 'editors', PIGEONHOLES_PKG_NAME ], //[ 'p_pigeonholes_admin', 'Can administer all aspects of pigeonholes', 'editors', PIGEONHOLES_PKG_NAME ], ] ); // Requirements $gBitInstaller->registerRequirements( PIGEONHOLES_PKG_NAME, [ 'liberty' => [ 'min' => '5.0.0' ], ] );