Skip to content

Instantly share code, notes, and snippets.

@dimaqw
Last active December 27, 2015 08:59
Show Gist options
  • Save dimaqw/7300565 to your computer and use it in GitHub Desktop.
Save dimaqw/7300565 to your computer and use it in GitHub Desktop.
<?php
$dictionary["px_books_users_1"] = array(
'true_relationship_type' => 'many-to-many',
'from_studio' => true,
'relationships' =>
array(
'px_books_users_1' =>
array(
'lhs_module' => 'PX_Books',
'lhs_table' => 'px_books',
'lhs_key' => 'id',
'rhs_module' => 'Users',
'rhs_table' => 'users',
'rhs_key' => 'id',
'relationship_type' => 'many-to-many',
'join_table' => 'px_books_users_1_c',
'join_key_lhs' => 'px_books_users_1px_books_ida',
'join_key_rhs' => 'px_books_users_1users_idb',
),
),
'table' => 'px_books_users_1_c',
'fields' =>
array(
0 => array(
'name' => 'id',
'type' => 'varchar',
'len' => 36,
),
1 => array(
'name' => 'date_modified',
'type' => 'datetime',
),
2 => array(
'name' => 'deleted',
'type' => 'bool',
'len' => '1',
'default' => '0',
'required' => true,
),
3 => array(
'name' => 'px_books_users_1px_books_ida',
'type' => 'varchar',
'len' => 36,
),
4 => array(
'name' => 'px_books_users_1users_idb',
'type' => 'varchar',
'len' => 36,
),
),
'indices' =>
array(
0 => array(
'name' => 'px_books_users_1spk',
'type' => 'primary',
'fields' =>
array(
0 => 'id',
),
),
1 => array(
'name' => 'px_books_users_1_alt',
'type' => 'alternate_key',
'fields' =>
array(
0 => 'px_books_users_1px_books_ida',
1 => 'px_books_users_1users_idb',
),
),
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment