|
@@ -8,166 +8,166 @@ |
|
|
block discarded – undo |
|
8
|
8
|
|
|
9
|
9
|
return array( |
|
10
|
10
|
'table' => array( |
|
11
|
|
- 'fos_user' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
12
|
|
- |
|
13
|
|
- $table = $schema->createTable( 'fos_user' ); |
|
14
|
|
- |
|
15
|
|
- $table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) ); |
|
16
|
|
- $table->addColumn( 'siteid', 'integer', array( 'notnull' => false ) ); |
|
17
|
|
- $table->addColumn( 'username', 'string', array( 'length' => 180 ) ); |
|
18
|
|
- $table->addColumn( 'username_canonical', 'string', array( 'length' => 180 ) ); |
|
19
|
|
- $table->addColumn( 'email', 'string', array( 'length' => 180 ) ); |
|
20
|
|
- $table->addColumn( 'email_canonical', 'string', array( 'length' => 180 ) ); |
|
21
|
|
- $table->addColumn( 'enabled', 'boolean', [] ); |
|
22
|
|
- $table->addColumn( 'salt', 'string', array( 'length' => 255, 'notnull' => false ) ); |
|
23
|
|
- $table->addColumn( 'password', 'string', array( 'length' => 255 ) ); |
|
24
|
|
- $table->addColumn( 'last_login', 'datetime', array( 'notnull' => false ) ); |
|
25
|
|
- $table->addColumn( 'confirmation_token', 'string', array( 'length' => 180, 'notnull' => false ) ); |
|
26
|
|
- $table->addColumn( 'password_requested_at', 'datetime', array( 'notnull' => false ) ); |
|
27
|
|
- $table->addColumn( 'roles', 'text', array( 'length' => 0x7fffffff, 'comment' => '(DC2Type:array)' ) ); |
|
28
|
|
- $table->addColumn( 'salutation', 'string', array( 'length' => 8, 'default' => '' ) ); |
|
29
|
|
- $table->addColumn( 'company', 'string', array( 'length' => 100, 'default' => '' ) ); |
|
30
|
|
- $table->addColumn( 'vatid', 'string', array( 'length' => 32, 'default' => '' ) ); |
|
31
|
|
- $table->addColumn( 'title', 'string', array( 'length' => 64, 'default' => '' ) ); |
|
32
|
|
- $table->addColumn( 'firstname', 'string', array( 'length' => 64, 'default' => '' ) ); |
|
33
|
|
- $table->addColumn( 'lastname', 'string', array( 'length' => 64, 'default' => '' ) ); |
|
34
|
|
- $table->addColumn( 'address1', 'string', array( 'length' => 200, 'default' => '' ) ); |
|
35
|
|
- $table->addColumn( 'address2', 'string', array( 'length' => 200, 'default' => '' ) ); |
|
36
|
|
- $table->addColumn( 'address3', 'string', array( 'length' => 200, 'default' => '' ) ); |
|
37
|
|
- $table->addColumn( 'postal', 'string', array( 'length' => 16, 'default' => '' ) ); |
|
38
|
|
- $table->addColumn( 'city', 'string', array( 'length' => 200, 'default' => '' ) ); |
|
39
|
|
- $table->addColumn( 'state', 'string', array( 'length' => 200, 'default' => '' ) ); |
|
40
|
|
- $table->addColumn( 'langid', 'string', array( 'length' => 5, 'notnull' => false ) ); |
|
41
|
|
- $table->addColumn( 'countryid', 'string', array( 'length' => 2, 'notnull' => false, 'fixed' => true ) ); |
|
42
|
|
- $table->addColumn( 'telephone', 'string', array( 'length' => 32, 'default' => '' ) ); |
|
43
|
|
- $table->addColumn( 'telefax', 'string', array( 'length' => 32, 'default' => '' ) ); |
|
44
|
|
- $table->addColumn( 'website', 'string', array( 'length' => 255, 'default' => '' ) ); |
|
45
|
|
- $table->addColumn( 'longitude', 'decimal', array( 'precision' => 8, 'scale' => 6, 'notnull' => false ) ); |
|
46
|
|
- $table->addColumn( 'latitude', 'decimal', array( 'precision' => 8, 'scale' => 6, 'notnull' => false ) ); |
|
47
|
|
- $table->addColumn( 'birthday', 'date', array( 'notnull' => false ) ); |
|
48
|
|
- $table->addColumn( 'vdate', 'date', array( 'notnull' => false ) ); |
|
49
|
|
- $table->addColumn( 'mtime', 'datetime', array( 'notnull' => false ) ); |
|
50
|
|
- $table->addColumn( 'ctime', 'datetime', array( 'notnull' => false ) ); |
|
51
|
|
- $table->addColumn( 'editor', 'string', array('length' => 255, 'default' => '' ) ); |
|
52
|
|
- |
|
53
|
|
- $table->setPrimaryKey( array( 'id' ), 'pk_fosus_id' ); |
|
54
|
|
- $table->addUniqueIndex( array( 'confirmation_token' ), 'unq_fosus_confirmtoken' ); |
|
55
|
|
- $table->addUniqueIndex( array( 'username_canonical' ), 'unq_fosus_username' ); |
|
56
|
|
- $table->addUniqueIndex( array( 'email_canonical' ), 'unq_fosus_email' ); |
|
57
|
|
- $table->addIndex( array( 'langid' ), 'idx_fosus_langid' ); |
|
58
|
|
- $table->addIndex( array( 'lastname', 'firstname' ), 'idx_fosus_last_first' ); |
|
59
|
|
- $table->addIndex( array( 'postal', 'address1' ), 'idx_fosus_post_addr1' ); |
|
60
|
|
- $table->addIndex( array( 'postal', 'city' ), 'idx_fosus_post_city' ); |
|
61
|
|
- $table->addIndex( array( 'lastname' ), 'idx_fosus_lastname' ); |
|
62
|
|
- $table->addIndex( array( 'address1' ), 'idx_fosus_address1' ); |
|
63
|
|
- $table->addIndex( array( 'city' ), 'idx_fosus_city' ); |
|
|
11
|
+ 'fos_user' => function(\Doctrine\DBAL\Schema\Schema $schema) { |
|
|
12
|
+ |
|
|
13
|
+ $table = $schema->createTable('fos_user'); |
|
|
14
|
+ |
|
|
15
|
+ $table->addColumn('id', 'integer', array('autoincrement' => true)); |
|
|
16
|
+ $table->addColumn('siteid', 'integer', array('notnull' => false)); |
|
|
17
|
+ $table->addColumn('username', 'string', array('length' => 180)); |
|
|
18
|
+ $table->addColumn('username_canonical', 'string', array('length' => 180)); |
|
|
19
|
+ $table->addColumn('email', 'string', array('length' => 180)); |
|
|
20
|
+ $table->addColumn('email_canonical', 'string', array('length' => 180)); |
|
|
21
|
+ $table->addColumn('enabled', 'boolean', []); |
|
|
22
|
+ $table->addColumn('salt', 'string', array('length' => 255, 'notnull' => false)); |
|
|
23
|
+ $table->addColumn('password', 'string', array('length' => 255)); |
|
|
24
|
+ $table->addColumn('last_login', 'datetime', array('notnull' => false)); |
|
|
25
|
+ $table->addColumn('confirmation_token', 'string', array('length' => 180, 'notnull' => false)); |
|
|
26
|
+ $table->addColumn('password_requested_at', 'datetime', array('notnull' => false)); |
|
|
27
|
+ $table->addColumn('roles', 'text', array('length' => 0x7fffffff, 'comment' => '(DC2Type:array)')); |
|
|
28
|
+ $table->addColumn('salutation', 'string', array('length' => 8, 'default' => '')); |
|
|
29
|
+ $table->addColumn('company', 'string', array('length' => 100, 'default' => '')); |
|
|
30
|
+ $table->addColumn('vatid', 'string', array('length' => 32, 'default' => '')); |
|
|
31
|
+ $table->addColumn('title', 'string', array('length' => 64, 'default' => '')); |
|
|
32
|
+ $table->addColumn('firstname', 'string', array('length' => 64, 'default' => '')); |
|
|
33
|
+ $table->addColumn('lastname', 'string', array('length' => 64, 'default' => '')); |
|
|
34
|
+ $table->addColumn('address1', 'string', array('length' => 200, 'default' => '')); |
|
|
35
|
+ $table->addColumn('address2', 'string', array('length' => 200, 'default' => '')); |
|
|
36
|
+ $table->addColumn('address3', 'string', array('length' => 200, 'default' => '')); |
|
|
37
|
+ $table->addColumn('postal', 'string', array('length' => 16, 'default' => '')); |
|
|
38
|
+ $table->addColumn('city', 'string', array('length' => 200, 'default' => '')); |
|
|
39
|
+ $table->addColumn('state', 'string', array('length' => 200, 'default' => '')); |
|
|
40
|
+ $table->addColumn('langid', 'string', array('length' => 5, 'notnull' => false)); |
|
|
41
|
+ $table->addColumn('countryid', 'string', array('length' => 2, 'notnull' => false, 'fixed' => true)); |
|
|
42
|
+ $table->addColumn('telephone', 'string', array('length' => 32, 'default' => '')); |
|
|
43
|
+ $table->addColumn('telefax', 'string', array('length' => 32, 'default' => '')); |
|
|
44
|
+ $table->addColumn('website', 'string', array('length' => 255, 'default' => '')); |
|
|
45
|
+ $table->addColumn('longitude', 'decimal', array('precision' => 8, 'scale' => 6, 'notnull' => false)); |
|
|
46
|
+ $table->addColumn('latitude', 'decimal', array('precision' => 8, 'scale' => 6, 'notnull' => false)); |
|
|
47
|
+ $table->addColumn('birthday', 'date', array('notnull' => false)); |
|
|
48
|
+ $table->addColumn('vdate', 'date', array('notnull' => false)); |
|
|
49
|
+ $table->addColumn('mtime', 'datetime', array('notnull' => false)); |
|
|
50
|
+ $table->addColumn('ctime', 'datetime', array('notnull' => false)); |
|
|
51
|
+ $table->addColumn('editor', 'string', array('length' => 255, 'default' => '')); |
|
|
52
|
+ |
|
|
53
|
+ $table->setPrimaryKey(array('id'), 'pk_fosus_id'); |
|
|
54
|
+ $table->addUniqueIndex(array('confirmation_token'), 'unq_fosus_confirmtoken'); |
|
|
55
|
+ $table->addUniqueIndex(array('username_canonical'), 'unq_fosus_username'); |
|
|
56
|
+ $table->addUniqueIndex(array('email_canonical'), 'unq_fosus_email'); |
|
|
57
|
+ $table->addIndex(array('langid'), 'idx_fosus_langid'); |
|
|
58
|
+ $table->addIndex(array('lastname', 'firstname'), 'idx_fosus_last_first'); |
|
|
59
|
+ $table->addIndex(array('postal', 'address1'), 'idx_fosus_post_addr1'); |
|
|
60
|
+ $table->addIndex(array('postal', 'city'), 'idx_fosus_post_city'); |
|
|
61
|
+ $table->addIndex(array('lastname'), 'idx_fosus_lastname'); |
|
|
62
|
+ $table->addIndex(array('address1'), 'idx_fosus_address1'); |
|
|
63
|
+ $table->addIndex(array('city'), 'idx_fosus_city'); |
|
64
|
64
|
|
|
65
|
65
|
return $schema; |
|
66
|
66
|
}, |
|
67
|
67
|
|
|
68
|
|
- 'fos_user_address' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
69
|
|
- |
|
70
|
|
- $table = $schema->createTable( 'fos_user_address' ); |
|
71
|
|
- |
|
72
|
|
- $table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) ); |
|
73
|
|
- $table->addColumn( 'siteid', 'integer', [] ); |
|
74
|
|
- $table->addColumn( 'parentid', 'integer', [] ); |
|
75
|
|
- $table->addColumn( 'company', 'string', array( 'length' => 100 ) ); |
|
76
|
|
- $table->addColumn( 'vatid', 'string', array( 'length' => 32 ) ); |
|
77
|
|
- $table->addColumn( 'salutation', 'string', array( 'length' => 8 ) ); |
|
78
|
|
- $table->addColumn( 'title', 'string', array( 'length' => 64 ) ); |
|
79
|
|
- $table->addColumn( 'firstname', 'string', array( 'length' => 64 ) ); |
|
80
|
|
- $table->addColumn( 'lastname', 'string', array( 'length' => 64 ) ); |
|
81
|
|
- $table->addColumn( 'address1', 'string', array( 'length' => 200 ) ); |
|
82
|
|
- $table->addColumn( 'address2', 'string', array( 'length' => 200 ) ); |
|
83
|
|
- $table->addColumn( 'address3', 'string', array( 'length' => 200 ) ); |
|
84
|
|
- $table->addColumn( 'postal', 'string', array( 'length' => 16 ) ); |
|
85
|
|
- $table->addColumn( 'city', 'string', array( 'length' => 200 ) ); |
|
86
|
|
- $table->addColumn( 'state', 'string', array( 'length' => 200 ) ); |
|
87
|
|
- $table->addColumn( 'langid', 'string', array( 'length' => 5, 'notnull' => false ) ); |
|
88
|
|
- $table->addColumn( 'countryid', 'string', array( 'length' => 2, 'notnull' => false, 'fixed' => true ) ); |
|
89
|
|
- $table->addColumn( 'telephone', 'string', array( 'length' => 32 ) ); |
|
90
|
|
- $table->addColumn( 'email', 'string', array( 'length' => 255 ) ); |
|
91
|
|
- $table->addColumn( 'telefax', 'string', array( 'length' => 255 ) ); |
|
92
|
|
- $table->addColumn( 'website', 'string', array( 'length' => 255 ) ); |
|
93
|
|
- $table->addColumn( 'longitude', 'decimal', array( 'precision' => 8, 'scale' => 6, 'notnull' => false ) ); |
|
94
|
|
- $table->addColumn( 'latitude', 'decimal', array( 'precision' => 8, 'scale' => 6, 'notnull' => false ) ); |
|
95
|
|
- $table->addColumn( 'flag', 'integer', [] ); |
|
96
|
|
- $table->addColumn( 'pos', 'smallint', [] ); |
|
97
|
|
- $table->addColumn( 'mtime', 'datetime', [] ); |
|
98
|
|
- $table->addColumn( 'ctime', 'datetime', [] ); |
|
99
|
|
- $table->addColumn( 'editor', 'string', array('length' => 255 ) ); |
|
100
|
|
- |
|
101
|
|
- $table->setPrimaryKey( array( 'id' ), 'pk_fosad_id' ); |
|
102
|
|
- $table->addIndex( array( 'parentid' ), 'idx_fosad_pid' ); |
|
103
|
|
- $table->addIndex( array( 'lastname', 'firstname' ), 'idx_fosad_last_first' ); |
|
104
|
|
- $table->addIndex( array( 'postal', 'address1' ), 'idx_fosad_post_addr1' ); |
|
105
|
|
- $table->addIndex( array( 'postal', 'city' ), 'idx_fosad_post_city' ); |
|
106
|
|
- $table->addIndex( array( 'address1' ), 'idx_fosad_address1' ); |
|
107
|
|
- $table->addIndex( array( 'city' ), 'idx_fosad_city' ); |
|
108
|
|
- $table->addIndex( array( 'email' ), 'idx_fosad_email' ); |
|
109
|
|
- |
|
110
|
|
- $table->addForeignKeyConstraint( 'fos_user', array( 'parentid' ), array( 'id' ), |
|
111
|
|
- array( 'onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE' ), 'fk_fosad_pid' ); |
|
|
68
|
+ 'fos_user_address' => function(\Doctrine\DBAL\Schema\Schema $schema) { |
|
|
69
|
+ |
|
|
70
|
+ $table = $schema->createTable('fos_user_address'); |
|
|
71
|
+ |
|
|
72
|
+ $table->addColumn('id', 'integer', array('autoincrement' => true)); |
|
|
73
|
+ $table->addColumn('siteid', 'integer', []); |
|
|
74
|
+ $table->addColumn('parentid', 'integer', []); |
|
|
75
|
+ $table->addColumn('company', 'string', array('length' => 100)); |
|
|
76
|
+ $table->addColumn('vatid', 'string', array('length' => 32)); |
|
|
77
|
+ $table->addColumn('salutation', 'string', array('length' => 8)); |
|
|
78
|
+ $table->addColumn('title', 'string', array('length' => 64)); |
|
|
79
|
+ $table->addColumn('firstname', 'string', array('length' => 64)); |
|
|
80
|
+ $table->addColumn('lastname', 'string', array('length' => 64)); |
|
|
81
|
+ $table->addColumn('address1', 'string', array('length' => 200)); |
|
|
82
|
+ $table->addColumn('address2', 'string', array('length' => 200)); |
|
|
83
|
+ $table->addColumn('address3', 'string', array('length' => 200)); |
|
|
84
|
+ $table->addColumn('postal', 'string', array('length' => 16)); |
|
|
85
|
+ $table->addColumn('city', 'string', array('length' => 200)); |
|
|
86
|
+ $table->addColumn('state', 'string', array('length' => 200)); |
|
|
87
|
+ $table->addColumn('langid', 'string', array('length' => 5, 'notnull' => false)); |
|
|
88
|
+ $table->addColumn('countryid', 'string', array('length' => 2, 'notnull' => false, 'fixed' => true)); |
|
|
89
|
+ $table->addColumn('telephone', 'string', array('length' => 32)); |
|
|
90
|
+ $table->addColumn('email', 'string', array('length' => 255)); |
|
|
91
|
+ $table->addColumn('telefax', 'string', array('length' => 255)); |
|
|
92
|
+ $table->addColumn('website', 'string', array('length' => 255)); |
|
|
93
|
+ $table->addColumn('longitude', 'decimal', array('precision' => 8, 'scale' => 6, 'notnull' => false)); |
|
|
94
|
+ $table->addColumn('latitude', 'decimal', array('precision' => 8, 'scale' => 6, 'notnull' => false)); |
|
|
95
|
+ $table->addColumn('flag', 'integer', []); |
|
|
96
|
+ $table->addColumn('pos', 'smallint', []); |
|
|
97
|
+ $table->addColumn('mtime', 'datetime', []); |
|
|
98
|
+ $table->addColumn('ctime', 'datetime', []); |
|
|
99
|
+ $table->addColumn('editor', 'string', array('length' => 255)); |
|
|
100
|
+ |
|
|
101
|
+ $table->setPrimaryKey(array('id'), 'pk_fosad_id'); |
|
|
102
|
+ $table->addIndex(array('parentid'), 'idx_fosad_pid'); |
|
|
103
|
+ $table->addIndex(array('lastname', 'firstname'), 'idx_fosad_last_first'); |
|
|
104
|
+ $table->addIndex(array('postal', 'address1'), 'idx_fosad_post_addr1'); |
|
|
105
|
+ $table->addIndex(array('postal', 'city'), 'idx_fosad_post_city'); |
|
|
106
|
+ $table->addIndex(array('address1'), 'idx_fosad_address1'); |
|
|
107
|
+ $table->addIndex(array('city'), 'idx_fosad_city'); |
|
|
108
|
+ $table->addIndex(array('email'), 'idx_fosad_email'); |
|
|
109
|
+ |
|
|
110
|
+ $table->addForeignKeyConstraint('fos_user', array('parentid'), array('id'), |
|
|
111
|
+ array('onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE'), 'fk_fosad_pid'); |
|
112
|
112
|
|
|
113
|
113
|
return $schema; |
|
114
|
114
|
}, |
|
115
|
115
|
|
|
116
|
|
- 'fos_user_list_type' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
|
116
|
+ 'fos_user_list_type' => function(\Doctrine\DBAL\Schema\Schema $schema) { |
|
117
|
117
|
|
|
118
|
|
- $table = $schema->createTable( 'fos_user_list_type' ); |
|
|
118
|
+ $table = $schema->createTable('fos_user_list_type'); |
|
119
|
119
|
|
|
120
|
|
- $table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) ); |
|
121
|
|
- $table->addColumn( 'siteid', 'integer', [] ); |
|
122
|
|
- $table->addColumn( 'domain', 'string', array( 'length' => 32 ) ); |
|
123
|
|
- $table->addColumn( 'code', 'string', array( 'length' => 32 ) ); |
|
124
|
|
- $table->addColumn( 'label', 'string', array( 'length' => 255 ) ); |
|
125
|
|
- $table->addColumn( 'status', 'smallint', [] ); |
|
126
|
|
- $table->addColumn( 'mtime', 'datetime', [] ); |
|
127
|
|
- $table->addColumn( 'ctime', 'datetime', [] ); |
|
128
|
|
- $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); |
|
|
120
|
+ $table->addColumn('id', 'integer', array('autoincrement' => true)); |
|
|
121
|
+ $table->addColumn('siteid', 'integer', []); |
|
|
122
|
+ $table->addColumn('domain', 'string', array('length' => 32)); |
|
|
123
|
+ $table->addColumn('code', 'string', array('length' => 32)); |
|
|
124
|
+ $table->addColumn('label', 'string', array('length' => 255)); |
|
|
125
|
+ $table->addColumn('status', 'smallint', []); |
|
|
126
|
+ $table->addColumn('mtime', 'datetime', []); |
|
|
127
|
+ $table->addColumn('ctime', 'datetime', []); |
|
|
128
|
+ $table->addColumn('editor', 'string', array('length' => 255)); |
|
129
|
129
|
|
|
130
|
|
- $table->setPrimaryKey( array( 'id' ), 'pk_foslity_id' ); |
|
131
|
|
- $table->addUniqueIndex( array( 'siteid', 'domain', 'code' ), 'unq_foslity_sid_dom_code' ); |
|
132
|
|
- $table->addIndex( array( 'siteid', 'status' ), 'idx_foslity_sid_status' ); |
|
133
|
|
- $table->addIndex( array( 'siteid', 'label' ), 'idx_foslity_sid_label' ); |
|
134
|
|
- $table->addIndex( array( 'siteid', 'code' ), 'idx_foslity_sid_code' ); |
|
|
130
|
+ $table->setPrimaryKey(array('id'), 'pk_foslity_id'); |
|
|
131
|
+ $table->addUniqueIndex(array('siteid', 'domain', 'code'), 'unq_foslity_sid_dom_code'); |
|
|
132
|
+ $table->addIndex(array('siteid', 'status'), 'idx_foslity_sid_status'); |
|
|
133
|
+ $table->addIndex(array('siteid', 'label'), 'idx_foslity_sid_label'); |
|
|
134
|
+ $table->addIndex(array('siteid', 'code'), 'idx_foslity_sid_code'); |
|
135
|
135
|
|
|
136
|
136
|
return $schema; |
|
137
|
137
|
}, |
|
138
|
138
|
|
|
139
|
|
- 'fos_user_list' => function ( \Doctrine\DBAL\Schema\Schema $schema ) { |
|
140
|
|
- |
|
141
|
|
- $table = $schema->createTable( 'fos_user_list' ); |
|
142
|
|
- |
|
143
|
|
- $table->addColumn( 'id', 'integer', array( 'autoincrement' => true ) ); |
|
144
|
|
- $table->addColumn( 'parentid', 'integer', [] ); |
|
145
|
|
- $table->addColumn( 'siteid', 'integer', [] ); |
|
146
|
|
- $table->addColumn( 'typeid', 'integer', [] ); |
|
147
|
|
- $table->addColumn( 'domain', 'string', array( 'length' => 32 ) ); |
|
148
|
|
- $table->addColumn( 'refid', 'string', array( 'length' => 32 ) ); |
|
149
|
|
- $table->addColumn( 'start', 'datetime', array( 'notnull' => false ) ); |
|
150
|
|
- $table->addColumn( 'end', 'datetime', array( 'notnull' => false ) ); |
|
151
|
|
- $table->addColumn( 'config', 'text', array( 'length' => 0xffff ) ); |
|
152
|
|
- $table->addColumn( 'pos', 'integer', [] ); |
|
153
|
|
- $table->addColumn( 'status', 'smallint', [] ); |
|
154
|
|
- $table->addColumn( 'mtime', 'datetime', [] ); |
|
155
|
|
- $table->addColumn( 'ctime', 'datetime', [] ); |
|
156
|
|
- $table->addColumn( 'editor', 'string', array( 'length' => 255 ) ); |
|
157
|
|
- |
|
158
|
|
- $table->setPrimaryKey( array( 'id' ), 'pk_fosli_id' ); |
|
159
|
|
- $table->addUniqueIndex( array( 'siteid', 'domain', 'refid', 'typeid', 'parentid' ), 'unq_fosli_sid_dm_rid_tid_pid' ); |
|
160
|
|
- $table->addIndex( array( 'siteid', 'status', 'start', 'end' ), 'idx_fosli_sid_stat_start_end' ); |
|
161
|
|
- $table->addIndex( array( 'parentid', 'siteid', 'refid', 'domain', 'typeid' ), 'idx_fosli_pid_sid_rid_dom_tid' ); |
|
162
|
|
- $table->addIndex( array( 'parentid', 'siteid', 'start' ), 'idx_fosli_pid_sid_start' ); |
|
163
|
|
- $table->addIndex( array( 'parentid', 'siteid', 'end' ), 'idx_fosli_pid_sid_end' ); |
|
164
|
|
- $table->addIndex( array( 'parentid', 'siteid', 'pos' ), 'idx_fosli_pid_sid_pos' ); |
|
165
|
|
- |
|
166
|
|
- $table->addForeignKeyConstraint( 'fos_user', array( 'parentid' ), array( 'id' ), |
|
167
|
|
- array( 'onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE' ), 'fk_fosli_pid' ); |
|
168
|
|
- |
|
169
|
|
- $table->addForeignKeyConstraint( 'fos_user_list_type', array( 'typeid' ), array( 'id' ), |
|
170
|
|
- array( 'onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE' ), 'fk_fosli_typeid' ); |
|
|
139
|
+ 'fos_user_list' => function(\Doctrine\DBAL\Schema\Schema $schema) { |
|
|
140
|
+ |
|
|
141
|
+ $table = $schema->createTable('fos_user_list'); |
|
|
142
|
+ |
|
|
143
|
+ $table->addColumn('id', 'integer', array('autoincrement' => true)); |
|
|
144
|
+ $table->addColumn('parentid', 'integer', []); |
|
|
145
|
+ $table->addColumn('siteid', 'integer', []); |
|
|
146
|
+ $table->addColumn('typeid', 'integer', []); |
|
|
147
|
+ $table->addColumn('domain', 'string', array('length' => 32)); |
|
|
148
|
+ $table->addColumn('refid', 'string', array('length' => 32)); |
|
|
149
|
+ $table->addColumn('start', 'datetime', array('notnull' => false)); |
|
|
150
|
+ $table->addColumn('end', 'datetime', array('notnull' => false)); |
|
|
151
|
+ $table->addColumn('config', 'text', array('length' => 0xffff)); |
|
|
152
|
+ $table->addColumn('pos', 'integer', []); |
|
|
153
|
+ $table->addColumn('status', 'smallint', []); |
|
|
154
|
+ $table->addColumn('mtime', 'datetime', []); |
|
|
155
|
+ $table->addColumn('ctime', 'datetime', []); |
|
|
156
|
+ $table->addColumn('editor', 'string', array('length' => 255)); |
|
|
157
|
+ |
|
|
158
|
+ $table->setPrimaryKey(array('id'), 'pk_fosli_id'); |
|
|
159
|
+ $table->addUniqueIndex(array('siteid', 'domain', 'refid', 'typeid', 'parentid'), 'unq_fosli_sid_dm_rid_tid_pid'); |
|
|
160
|
+ $table->addIndex(array('siteid', 'status', 'start', 'end'), 'idx_fosli_sid_stat_start_end'); |
|
|
161
|
+ $table->addIndex(array('parentid', 'siteid', 'refid', 'domain', 'typeid'), 'idx_fosli_pid_sid_rid_dom_tid'); |
|
|
162
|
+ $table->addIndex(array('parentid', 'siteid', 'start'), 'idx_fosli_pid_sid_start'); |
|
|
163
|
+ $table->addIndex(array('parentid', 'siteid', 'end'), 'idx_fosli_pid_sid_end'); |
|
|
164
|
+ $table->addIndex(array('parentid', 'siteid', 'pos'), 'idx_fosli_pid_sid_pos'); |
|
|
165
|
+ |
|
|
166
|
+ $table->addForeignKeyConstraint('fos_user', array('parentid'), array('id'), |
|
|
167
|
+ array('onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE'), 'fk_fosli_pid'); |
|
|
168
|
+ |
|
|
169
|
+ $table->addForeignKeyConstraint('fos_user_list_type', array('typeid'), array('id'), |
|
|
170
|
+ array('onUpdate' => 'CASCADE', 'onDelete' => 'CASCADE'), 'fk_fosli_typeid'); |
|
171
|
171
|
|
|
172
|
172
|
return $schema; |
|
173
|
173
|
}, |