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