@@ 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 |
@@ 250-267 (lines=18) @@ | ||
247 | * |
|
248 | * @param Schema $schema |
|
249 | */ |
|
250 | protected function createOrocrmSalesFunnelTable(Schema $schema) |
|
251 | { |
|
252 | $table = $schema->createTable('orocrm_sales_funnel'); |
|
253 | $table->addColumn('id', 'integer', ['autoincrement' => true]); |
|
254 | $table->addColumn('user_owner_id', 'integer', ['notnull' => false]); |
|
255 | $table->addColumn('opportunity_id', 'integer', ['notnull' => false]); |
|
256 | $table->addColumn('lead_id', 'integer', ['notnull' => false]); |
|
257 | $table->addColumn('data_channel_id', 'integer', ['notnull' => false]); |
|
258 | $table->addColumn('startdate', 'date', []); |
|
259 | $table->addColumn('createdat', 'datetime', []); |
|
260 | $table->addColumn('updatedat', 'datetime', ['notnull' => false]); |
|
261 | $table->addIndex(['opportunity_id'], 'idx_e20c73449a34590f', []); |
|
262 | $table->addIndex(['lead_id'], 'idx_e20c734455458d', []); |
|
263 | $table->addIndex(['startdate'], 'sales_start_idx', []); |
|
264 | $table->setPrimaryKey(['id']); |
|
265 | $table->addIndex(['user_owner_id'], 'idx_e20c73449eb185f9', []); |
|
266 | $table->addIndex(['data_channel_id'], 'IDX_E20C7344BDC09B73', []); |
|
267 | } |
|
268 | ||
269 | /** |
|
270 | * Create orocrm_sales_opport_status table |