Completed
Push — master ( ce8149...4452e8 )
by Aimeos
10:24
created
lib/custom/setup/default/schema/customer.php 1 patch
Spacing   +132 added lines, -132 removed lines patch added patch discarded remove patch
@@ -8,153 +8,153 @@
 block discarded – undo
8 8
 
9 9
 return array(
10 10
 	'table' => array(
11
-		'users' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
12
-
13
-			$table = $schema->createTable( 'users' );
14
-
15
-			$table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) );
16
-			$table->addColumn( 'siteid', 'integer', array( 'notnull' => false ) );
17
-			$table->addColumn( 'label', 'string', array( 'length' => 255, 'default' => '' ) );
18
-			$table->addColumn( 'name', 'string', array( 'length' => 255 ) );
19
-			$table->addColumn( 'remember_token', 'string', array( 'length' => 100, 'notnull' => false ) );
20
-			$table->addColumn( 'salutation', 'string', array( 'length' => 8, 'default' => '' ) );
21
-			$table->addColumn( 'company', 'string', array( 'length' => 100, 'default' => '' ) );
22
-			$table->addColumn( 'vatid', 'string', array( 'length' => 32, 'default' => '' ) );
23
-			$table->addColumn( 'title', 'string', array( 'length' => 64, 'default' => '' ) );
24
-			$table->addColumn( 'firstname', 'string', array( 'length' => 64, 'default' => '' ) );
25
-			$table->addColumn( 'lastname', 'string', array( 'length' => 64, 'default' => '' ) );
26
-			$table->addColumn( 'address1', 'string', array( 'length' => 200, 'default' => '' ) );
27
-			$table->addColumn( 'address2', 'string', array( 'length' => 200, 'default' => '' ) );
28
-			$table->addColumn( 'address3', 'string', array( 'length' => 200, 'default' => '' ) );
29
-			$table->addColumn( 'postal', 'string', array( 'length' => 16, 'default' => '' ) );
30
-			$table->addColumn( 'city', 'string', array( 'length' => 200, 'default' => '' ) );
31
-			$table->addColumn( 'state', 'string', array( 'length' => 200, 'default' => '' ) );
32
-			$table->addColumn( 'langid', 'string', array( 'length' => 5, 'notnull' => false ) );
33
-			$table->addColumn( 'countryid', 'string', array( 'length' => 2, 'notnull' => false, 'fixed' => true ) );
34
-			$table->addColumn( 'telephone', 'string', array( 'length' => 32, 'default' => '' ) );
35
-			$table->addColumn( 'telefax', 'string', array( 'length' => 32, 'default' => '' ) );
36
-			$table->addColumn( 'website', 'string', array( 'length' => 255, 'default' => '' ) );
37
-			$table->addColumn( 'email', 'string', array( 'length' => 255 ) );
38
-			$table->addColumn( 'password', 'string', array( 'length' => 255 ) );
39
-			$table->addColumn( 'longitude', 'decimal', array( 'precision' => 8, 'scale' => 6, 'notnull' => false ) );
40
-			$table->addColumn( 'latitude', 'decimal', array( 'precision' => 8, 'scale' => 6, 'notnull' => false ) );
41
-			$table->addColumn( 'birthday', 'date', array( 'notnull' => false ) );
42
-			$table->addColumn( 'vdate', 'date', array( 'notnull' => false ) );
43
-			$table->addColumn( 'status', 'smallint', array( 'default' => 1 ) );
44
-			$table->addColumn( 'updated_at', 'datetime', [] );
45
-			$table->addColumn( 'created_at', 'datetime', [] );
46
-			$table->addColumn( 'editor', 'string', array('length' => 255, 'default' => '' ) );
47
-
48
-			$table->setPrimaryKey( array( 'id' ), 'pk_lvusr_id' );
49
-			$table->addUniqueIndex( array( 'email' ), 'unq_lvusr_email' );
50
-			$table->addIndex( array( 'langid' ), 'idx_lvusr_langid' );
51
-			$table->addIndex( array( 'lastname', 'firstname' ), 'idx_lvusr_last_first' );
52
-			$table->addIndex( array( 'postal', 'address1' ), 'idx_lvusr_post_addr1' );
53
-			$table->addIndex( array( 'postal', 'city' ), 'idx_lvusr_post_city' );
54
-			$table->addIndex( array( 'lastname' ), 'idx_lvusr_lastname' );
55
-			$table->addIndex( array( 'address1' ), 'idx_lvusr_address1' );
56
-			$table->addIndex( array( 'city' ), 'idx_lvusr_city' );
11
+		'users' => function(\Doctrine\DBAL\Schema\Schema $schema) {
12
+
13
+			$table = $schema->createTable('users');
14
+
15
+			$table->addColumn('id', 'integer', array('autoincrement' => true));
16
+			$table->addColumn('siteid', 'integer', array('notnull' => false));
17
+			$table->addColumn('label', 'string', array('length' => 255, 'default' => ''));
18
+			$table->addColumn('name', 'string', array('length' => 255));
19
+			$table->addColumn('remember_token', 'string', array('length' => 100, 'notnull' => false));
20
+			$table->addColumn('salutation', 'string', array('length' => 8, 'default' => ''));
21
+			$table->addColumn('company', 'string', array('length' => 100, 'default' => ''));
22
+			$table->addColumn('vatid', 'string', array('length' => 32, 'default' => ''));
23
+			$table->addColumn('title', 'string', array('length' => 64, 'default' => ''));
24
+			$table->addColumn('firstname', 'string', array('length' => 64, 'default' => ''));
25
+			$table->addColumn('lastname', 'string', array('length' => 64, 'default' => ''));
26
+			$table->addColumn('address1', 'string', array('length' => 200, 'default' => ''));
27
+			$table->addColumn('address2', 'string', array('length' => 200, 'default' => ''));
28
+			$table->addColumn('address3', 'string', array('length' => 200, 'default' => ''));
29
+			$table->addColumn('postal', 'string', array('length' => 16, 'default' => ''));
30
+			$table->addColumn('city', 'string', array('length' => 200, 'default' => ''));
31
+			$table->addColumn('state', 'string', array('length' => 200, 'default' => ''));
32
+			$table->addColumn('langid', 'string', array('length' => 5, 'notnull' => false));
33
+			$table->addColumn('countryid', 'string', array('length' => 2, 'notnull' => false, 'fixed' => true));
34
+			$table->addColumn('telephone', 'string', array('length' => 32, 'default' => ''));
35
+			$table->addColumn('telefax', 'string', array('length' => 32, 'default' => ''));
36
+			$table->addColumn('website', 'string', array('length' => 255, 'default' => ''));
37
+			$table->addColumn('email', 'string', array('length' => 255));
38
+			$table->addColumn('password', 'string', array('length' => 255));
39
+			$table->addColumn('longitude', 'decimal', array('precision' => 8, 'scale' => 6, 'notnull' => false));
40
+			$table->addColumn('latitude', 'decimal', array('precision' => 8, 'scale' => 6, 'notnull' => false));
41
+			$table->addColumn('birthday', 'date', array('notnull' => false));
42
+			$table->addColumn('vdate', 'date', array('notnull' => false));
43
+			$table->addColumn('status', 'smallint', array('default' => 1));
44
+			$table->addColumn('updated_at', 'datetime', []);
45
+			$table->addColumn('created_at', 'datetime', []);
46
+			$table->addColumn('editor', 'string', array('length' => 255, 'default' => ''));
47
+
48
+			$table->setPrimaryKey(array('id'), 'pk_lvusr_id');
49
+			$table->addUniqueIndex(array('email'), 'unq_lvusr_email');
50
+			$table->addIndex(array('langid'), 'idx_lvusr_langid');
51
+			$table->addIndex(array('lastname', 'firstname'), 'idx_lvusr_last_first');
52
+			$table->addIndex(array('postal', 'address1'), 'idx_lvusr_post_addr1');
53
+			$table->addIndex(array('postal', 'city'), 'idx_lvusr_post_city');
54
+			$table->addIndex(array('lastname'), 'idx_lvusr_lastname');
55
+			$table->addIndex(array('address1'), 'idx_lvusr_address1');
56
+			$table->addIndex(array('city'), 'idx_lvusr_city');
57 57
 
58 58
 			return $schema;
59 59
 		},
60 60
 
61
-		'users_address' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
62
-
63
-			$table = $schema->createTable( 'users_address' );
64
-
65
-			$table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) );
66
-			$table->addColumn( 'siteid', 'integer', [] );
67
-			$table->addColumn( 'parentid', 'integer', [] );
68
-			$table->addColumn( 'company', 'string', array( 'length' => 100 ) );
69
-			$table->addColumn( 'vatid', 'string', array( 'length' => 32 ) );
70
-			$table->addColumn( 'salutation', 'string', array( 'length' => 8 ) );
71
-			$table->addColumn( 'title', 'string', array( 'length' => 64 ) );
72
-			$table->addColumn( 'firstname', 'string', array( 'length' => 64 ) );
73
-			$table->addColumn( 'lastname', 'string', array( 'length' => 64 ) );
74
-			$table->addColumn( 'address1', 'string', array( 'length' => 200 ) );
75
-			$table->addColumn( 'address2', 'string', array( 'length' => 200 ) );
76
-			$table->addColumn( 'address3', 'string', array( 'length' => 200 ) );
77
-			$table->addColumn( 'postal', 'string', array( 'length' => 16 ) );
78
-			$table->addColumn( 'city', 'string', array( 'length' => 200 ) );
79
-			$table->addColumn( 'state', 'string', array( 'length' => 200 ) );
80
-			$table->addColumn( 'langid', 'string', array( 'length' => 5, 'notnull' => false ) );
81
-			$table->addColumn( 'countryid', 'string', array( 'length' => 2, 'notnull' => false, 'fixed' => true ) );
82
-			$table->addColumn( 'telephone', 'string', array( 'length' => 32 ) );
83
-			$table->addColumn( 'email', 'string', array( 'length' => 255 ) );
84
-			$table->addColumn( 'telefax', 'string', array( 'length' => 255 ) );
85
-			$table->addColumn( 'website', 'string', array( 'length' => 255 ) );
86
-			$table->addColumn( 'longitude', 'decimal', array( 'precision' => 8, 'scale' => 6, 'notnull' => false ) );
87
-			$table->addColumn( 'latitude', 'decimal', array( 'precision' => 8, 'scale' => 6, 'notnull' => false ) );
88
-			$table->addColumn( 'flag', 'integer', [] );
89
-			$table->addColumn( 'pos', 'smallint', [] );
90
-			$table->addColumn( 'mtime', 'datetime', [] );
91
-			$table->addColumn( 'ctime', 'datetime', [] );
92
-			$table->addColumn( 'editor', 'string', array('length' => 255 ) );
93
-
94
-			$table->setPrimaryKey( array( 'id' ), 'pk_lvuad_id' );
95
-			$table->addIndex( array( 'parentid' ), 'idx_lvuad_pid' );
96
-			$table->addIndex( array( 'lastname', 'firstname' ), 'idx_lvuad_last_first' );
97
-			$table->addIndex( array( 'postal', 'address1' ), 'idx_lvuad_post_addr1' );
98
-			$table->addIndex( array( 'postal', 'city' ), 'idx_lvuad_post_city' );
99
-			$table->addIndex( array( 'address1' ), 'idx_lvuad_address1' );
100
-			$table->addIndex( array( 'city' ), 'idx_lvuad_city' );
101
-			$table->addIndex( array( 'email' ), 'idx_lvuad_email' );
61
+		'users_address' => function(\Doctrine\DBAL\Schema\Schema $schema) {
62
+
63
+			$table = $schema->createTable('users_address');
64
+
65
+			$table->addColumn('id', 'integer', array('autoincrement' => true));
66
+			$table->addColumn('siteid', 'integer', []);
67
+			$table->addColumn('parentid', 'integer', []);
68
+			$table->addColumn('company', 'string', array('length' => 100));
69
+			$table->addColumn('vatid', 'string', array('length' => 32));
70
+			$table->addColumn('salutation', 'string', array('length' => 8));
71
+			$table->addColumn('title', 'string', array('length' => 64));
72
+			$table->addColumn('firstname', 'string', array('length' => 64));
73
+			$table->addColumn('lastname', 'string', array('length' => 64));
74
+			$table->addColumn('address1', 'string', array('length' => 200));
75
+			$table->addColumn('address2', 'string', array('length' => 200));
76
+			$table->addColumn('address3', 'string', array('length' => 200));
77
+			$table->addColumn('postal', 'string', array('length' => 16));
78
+			$table->addColumn('city', 'string', array('length' => 200));
79
+			$table->addColumn('state', 'string', array('length' => 200));
80
+			$table->addColumn('langid', 'string', array('length' => 5, 'notnull' => false));
81
+			$table->addColumn('countryid', 'string', array('length' => 2, 'notnull' => false, 'fixed' => true));
82
+			$table->addColumn('telephone', 'string', array('length' => 32));
83
+			$table->addColumn('email', 'string', array('length' => 255));
84
+			$table->addColumn('telefax', 'string', array('length' => 255));
85
+			$table->addColumn('website', 'string', array('length' => 255));
86
+			$table->addColumn('longitude', 'decimal', array('precision' => 8, 'scale' => 6, 'notnull' => false));
87
+			$table->addColumn('latitude', 'decimal', array('precision' => 8, 'scale' => 6, 'notnull' => false));
88
+			$table->addColumn('flag', 'integer', []);
89
+			$table->addColumn('pos', 'smallint', []);
90
+			$table->addColumn('mtime', 'datetime', []);
91
+			$table->addColumn('ctime', 'datetime', []);
92
+			$table->addColumn('editor', 'string', array('length' => 255));
93
+
94
+			$table->setPrimaryKey(array('id'), 'pk_lvuad_id');
95
+			$table->addIndex(array('parentid'), 'idx_lvuad_pid');
96
+			$table->addIndex(array('lastname', 'firstname'), 'idx_lvuad_last_first');
97
+			$table->addIndex(array('postal', 'address1'), 'idx_lvuad_post_addr1');
98
+			$table->addIndex(array('postal', 'city'), 'idx_lvuad_post_city');
99
+			$table->addIndex(array('address1'), 'idx_lvuad_address1');
100
+			$table->addIndex(array('city'), 'idx_lvuad_city');
101
+			$table->addIndex(array('email'), 'idx_lvuad_email');
102 102
 
103 103
 			return $schema;
104 104
 		},
105 105
 
106
-		'users_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
106
+		'users_list_type' => function(\Doctrine\DBAL\Schema\Schema $schema) {
107 107
 
108
-			$table = $schema->createTable( 'users_list_type' );
108
+			$table = $schema->createTable('users_list_type');
109 109
 
110
-			$table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) );
111
-			$table->addColumn( 'siteid', 'integer', [] );
112
-			$table->addColumn( 'domain', 'string', array( 'length' => 32 ) );
113
-			$table->addColumn( 'code', 'string', array( 'length' => 32 ) );
114
-			$table->addColumn( 'label', 'string', array( 'length' => 255 ) );
115
-			$table->addColumn( 'status', 'smallint', [] );
116
-			$table->addColumn( 'mtime', 'datetime', [] );
117
-			$table->addColumn( 'ctime', 'datetime', [] );
118
-			$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
110
+			$table->addColumn('id', 'integer', array('autoincrement' => true));
111
+			$table->addColumn('siteid', 'integer', []);
112
+			$table->addColumn('domain', 'string', array('length' => 32));
113
+			$table->addColumn('code', 'string', array('length' => 32));
114
+			$table->addColumn('label', 'string', array('length' => 255));
115
+			$table->addColumn('status', 'smallint', []);
116
+			$table->addColumn('mtime', 'datetime', []);
117
+			$table->addColumn('ctime', 'datetime', []);
118
+			$table->addColumn('editor', 'string', array('length' => 255));
119 119
 
120
-			$table->setPrimaryKey( array( 'id' ), 'pk_lvulity_id' );
121
-			$table->addUniqueIndex( array( 'siteid', 'domain', 'code' ), 'unq_lvulity_sid_dom_code' );
122
-			$table->addIndex( array( 'siteid', 'status' ), 'idx_lvulity_sid_status' );
123
-			$table->addIndex( array( 'siteid', 'label' ), 'idx_lvulity_sid_label' );
124
-			$table->addIndex( array( 'siteid', 'code' ), 'idx_lvulity_sid_code' );
120
+			$table->setPrimaryKey(array('id'), 'pk_lvulity_id');
121
+			$table->addUniqueIndex(array('siteid', 'domain', 'code'), 'unq_lvulity_sid_dom_code');
122
+			$table->addIndex(array('siteid', 'status'), 'idx_lvulity_sid_status');
123
+			$table->addIndex(array('siteid', 'label'), 'idx_lvulity_sid_label');
124
+			$table->addIndex(array('siteid', 'code'), 'idx_lvulity_sid_code');
125 125
 
126 126
 			return $schema;
127 127
 		},
128 128
 
129
-		'users_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) {
130
-
131
-			$table = $schema->createTable( 'users_list' );
132
-
133
-			$table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) );
134
-			$table->addColumn( 'parentid', 'integer', [] );
135
-			$table->addColumn( 'siteid', 'integer', [] );
136
-			$table->addColumn( 'typeid', 'integer', [] );
137
-			$table->addColumn( 'domain', 'string', array( 'length' => 32 ) );
138
-			$table->addColumn( 'refid', 'string', array( 'length' => 32 ) );
139
-			$table->addColumn( 'start', 'datetime', array( 'notnull' => false ) );
140
-			$table->addColumn( 'end', 'datetime', array( 'notnull' => false ) );
141
-			$table->addColumn( 'config', 'text', array( 'length' => 0xffff ) );
142
-			$table->addColumn( 'pos', 'integer', [] );
143
-			$table->addColumn( 'status', 'smallint', [] );
144
-			$table->addColumn( 'mtime', 'datetime', [] );
145
-			$table->addColumn( 'ctime', 'datetime', [] );
146
-			$table->addColumn( 'editor', 'string', array( 'length' => 255 ) );
147
-
148
-			$table->setPrimaryKey( array( 'id' ), 'pk_lvuli_id' );
149
-			$table->addUniqueIndex( array( 'siteid', 'domain', 'refid', 'typeid', 'parentid' ), 'unq_lvuli_sid_dm_rid_tid_pid' );
150
-			$table->addIndex( array( 'siteid', 'status', 'start', 'end' ), 'idx_lvuli_sid_stat_start_end' );
151
-			$table->addIndex( array( 'parentid', 'siteid', 'refid', 'domain', 'typeid' ), 'idx_lvuli_pid_sid_rid_dom_tid' );
152
-			$table->addIndex( array( 'parentid', 'siteid', 'start' ), 'idx_lvuli_pid_sid_start' );
153
-			$table->addIndex( array( 'parentid', 'siteid', 'end' ), 'idx_lvuli_pid_sid_end' );
154
-			$table->addIndex( array( 'parentid', 'siteid', 'pos' ), 'idx_lvuli_pid_sid_pos' );
155
-
156
-			$table->addForeignKeyConstraint( 'users_list_type', array( 'typeid' ), array( 'id' ),
157
-				array( 'onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE' ), 'fk_lvuli_typeid' );
129
+		'users_list' => function(\Doctrine\DBAL\Schema\Schema $schema) {
130
+
131
+			$table = $schema->createTable('users_list');
132
+
133
+			$table->addColumn('id', 'integer', array('autoincrement' => true));
134
+			$table->addColumn('parentid', 'integer', []);
135
+			$table->addColumn('siteid', 'integer', []);
136
+			$table->addColumn('typeid', 'integer', []);
137
+			$table->addColumn('domain', 'string', array('length' => 32));
138
+			$table->addColumn('refid', 'string', array('length' => 32));
139
+			$table->addColumn('start', 'datetime', array('notnull' => false));
140
+			$table->addColumn('end', 'datetime', array('notnull' => false));
141
+			$table->addColumn('config', 'text', array('length' => 0xffff));
142
+			$table->addColumn('pos', 'integer', []);
143
+			$table->addColumn('status', 'smallint', []);
144
+			$table->addColumn('mtime', 'datetime', []);
145
+			$table->addColumn('ctime', 'datetime', []);
146
+			$table->addColumn('editor', 'string', array('length' => 255));
147
+
148
+			$table->setPrimaryKey(array('id'), 'pk_lvuli_id');
149
+			$table->addUniqueIndex(array('siteid', 'domain', 'refid', 'typeid', 'parentid'), 'unq_lvuli_sid_dm_rid_tid_pid');
150
+			$table->addIndex(array('siteid', 'status', 'start', 'end'), 'idx_lvuli_sid_stat_start_end');
151
+			$table->addIndex(array('parentid', 'siteid', 'refid', 'domain', 'typeid'), 'idx_lvuli_pid_sid_rid_dom_tid');
152
+			$table->addIndex(array('parentid', 'siteid', 'start'), 'idx_lvuli_pid_sid_start');
153
+			$table->addIndex(array('parentid', 'siteid', 'end'), 'idx_lvuli_pid_sid_end');
154
+			$table->addIndex(array('parentid', 'siteid', 'pos'), 'idx_lvuli_pid_sid_pos');
155
+
156
+			$table->addForeignKeyConstraint('users_list_type', array('typeid'), array('id'),
157
+				array('onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE'), 'fk_lvuli_typeid');
158 158
 
159 159
 			return $schema;
160 160
 		},
Please login to merge, or discard this patch.