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