| @@ 87-103 (lines=17) @@ | ||
| 84 | * |
|
| 85 | * @param Schema $schema |
|
| 86 | */ |
|
| 87 | protected function createOrocrmChannelCustIdentityTable(Schema $schema) |
|
| 88 | { |
|
| 89 | $table = $schema->createTable('orocrm_channel_cust_identity'); |
|
| 90 | $table->addColumn('id', 'integer', ['autoincrement' => true]); |
|
| 91 | $table->addColumn('data_channel_id', 'integer', ['notnull' => false]); |
|
| 92 | $table->addColumn('account_id', 'integer', ['notnull' => false]); |
|
| 93 | $table->addColumn('user_owner_id', 'integer', ['notnull' => false]); |
|
| 94 | $table->addColumn('contact_id', 'integer', ['notnull' => false]); |
|
| 95 | $table->addColumn('name', 'string', ['length' => 255]); |
|
| 96 | $table->addColumn('createdAt', 'datetime', []); |
|
| 97 | $table->addColumn('updatedAt', 'datetime', ['notnull' => false]); |
|
| 98 | $table->setPrimaryKey(['id']); |
|
| 99 | $table->addIndex(['account_id'], 'IDX_30F858859B6B5FBA', []); |
|
| 100 | $table->addIndex(['contact_id'], 'IDX_30F85885E7A1254A', []); |
|
| 101 | $table->addIndex(['user_owner_id'], 'IDX_30F858859EB185F9', []); |
|
| 102 | $table->addIndex(['data_channel_id'], 'IDX_30F8588572F5A1AA', []); |
|
| 103 | } |
|
| 104 | ||
| 105 | /** |
|
| 106 | * Add orocrm_channel foreign keys. |
|
| @@ 97-113 (lines=17) @@ | ||
| 94 | * |
|
| 95 | * @param Schema $schema |
|
| 96 | */ |
|
| 97 | protected function createOrocrmChannelCustIdentityTable(Schema $schema) |
|
| 98 | { |
|
| 99 | $table = $schema->createTable('orocrm_channel_cust_identity'); |
|
| 100 | $table->addColumn('id', 'integer', ['autoincrement' => true]); |
|
| 101 | $table->addColumn('contact_id', 'integer', ['notnull' => false]); |
|
| 102 | $table->addColumn('account_id', 'integer', ['notnull' => false]); |
|
| 103 | $table->addColumn('user_owner_id', 'integer', ['notnull' => false]); |
|
| 104 | $table->addColumn('data_channel_id', 'integer', ['notnull' => false]); |
|
| 105 | $table->addColumn('name', 'string', ['length' => 255]); |
|
| 106 | $table->addColumn('createdAt', 'datetime', []); |
|
| 107 | $table->addColumn('updatedAt', 'datetime', ['notnull' => false]); |
|
| 108 | $table->setPrimaryKey(['id']); |
|
| 109 | $table->addIndex(['account_id'], 'IDX_30F858859B6B5FBA', []); |
|
| 110 | $table->addIndex(['contact_id'], 'IDX_30F85885E7A1254A', []); |
|
| 111 | $table->addIndex(['user_owner_id'], 'IDX_30F858859EB185F9', []); |
|
| 112 | $table->addIndex(['data_channel_id'], 'IDX_30F8588572F5A1AA', []); |
|
| 113 | } |
|
| 114 | ||
| 115 | /** |
|
| 116 | * Create orocrm_channel_entity_name table |
|
| @@ 224-241 (lines=18) @@ | ||
| 221 | * |
|
| 222 | * @param Schema $schema |
|
| 223 | */ |
|
| 224 | protected function createOrocrmSalesFunnelTable(Schema $schema) |
|
| 225 | { |
|
| 226 | $table = $schema->createTable('orocrm_sales_funnel'); |
|
| 227 | $table->addColumn('id', 'integer', ['autoincrement' => true]); |
|
| 228 | $table->addColumn('user_owner_id', 'integer', ['notnull' => false]); |
|
| 229 | $table->addColumn('opportunity_id', 'integer', ['notnull' => false]); |
|
| 230 | $table->addColumn('lead_id', 'integer', ['notnull' => false]); |
|
| 231 | $table->addColumn('data_channel_id', 'integer', ['notnull' => false]); |
|
| 232 | $table->addColumn('startdate', 'date', []); |
|
| 233 | $table->addColumn('createdat', 'datetime', []); |
|
| 234 | $table->addColumn('updatedat', 'datetime', ['notnull' => false]); |
|
| 235 | $table->addIndex(['opportunity_id'], 'idx_e20c73449a34590f', []); |
|
| 236 | $table->addIndex(['lead_id'], 'idx_e20c734455458d', []); |
|
| 237 | $table->addIndex(['startdate'], 'sales_start_idx', []); |
|
| 238 | $table->setPrimaryKey(['id']); |
|
| 239 | $table->addIndex(['user_owner_id'], 'idx_e20c73449eb185f9', []); |
|
| 240 | $table->addIndex(['data_channel_id'], 'IDX_E20C7344BDC09B73', []); |
|
| 241 | } |
|
| 242 | ||
| 243 | /** |
|
| 244 | * Create orocrm_sales_opport_status table |
|