2424namespace OCA \Notifications \Migration ;
2525
2626use Closure ;
27- use Doctrine \DBAL \Types \Type ;
27+ use Doctrine \DBAL \Types \Types ;
2828use OCP \DB \ISchemaWrapper ;
2929use OCP \Migration \SimpleMigrationStep ;
3030use OCP \Migration \IOutput ;
@@ -43,55 +43,55 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
4343
4444 if (!$ schema ->hasTable ('notifications ' )) {
4545 $ table = $ schema ->createTable ('notifications ' );
46- $ table ->addColumn ('notification_id ' , Type ::INTEGER , [
46+ $ table ->addColumn ('notification_id ' , Types ::INTEGER , [
4747 'autoincrement ' => true ,
4848 'notnull ' => true ,
4949 'length ' => 4 ,
5050 ]);
51- $ table ->addColumn ('app ' , Type ::STRING , [
51+ $ table ->addColumn ('app ' , Types ::STRING , [
5252 'notnull ' => true ,
5353 'length ' => 32 ,
5454 ]);
55- $ table ->addColumn ('user ' , Type ::STRING , [
55+ $ table ->addColumn ('user ' , Types ::STRING , [
5656 'notnull ' => true ,
5757 'length ' => 64 ,
5858 ]);
59- $ table ->addColumn ('timestamp ' , Type ::INTEGER , [
59+ $ table ->addColumn ('timestamp ' , Types ::INTEGER , [
6060 'notnull ' => true ,
6161 'length ' => 4 ,
6262 'default ' => 0 ,
6363 ]);
64- $ table ->addColumn ('object_type ' , Type ::STRING , [
64+ $ table ->addColumn ('object_type ' , Types ::STRING , [
6565 'notnull ' => true ,
6666 'length ' => 64 ,
6767 ]);
68- $ table ->addColumn ('object_id ' , Type ::STRING , [
68+ $ table ->addColumn ('object_id ' , Types ::STRING , [
6969 'notnull ' => true ,
7070 'length ' => 64 ,
7171 ]);
72- $ table ->addColumn ('subject ' , Type ::STRING , [
72+ $ table ->addColumn ('subject ' , Types ::STRING , [
7373 'notnull ' => true ,
7474 'length ' => 64 ,
7575 ]);
76- $ table ->addColumn ('subject_parameters ' , Type ::TEXT , [
76+ $ table ->addColumn ('subject_parameters ' , Types ::TEXT , [
7777 'notnull ' => false ,
7878 ]);
79- $ table ->addColumn ('message ' , Type ::STRING , [
79+ $ table ->addColumn ('message ' , Types ::STRING , [
8080 'notnull ' => false ,
8181 'length ' => 64 ,
8282 ]);
83- $ table ->addColumn ('message_parameters ' , Type ::TEXT , [
83+ $ table ->addColumn ('message_parameters ' , Types ::TEXT , [
8484 'notnull ' => false ,
8585 ]);
86- $ table ->addColumn ('link ' , Type ::STRING , [
86+ $ table ->addColumn ('link ' , Types ::STRING , [
8787 'notnull ' => false ,
8888 'length ' => 4000 ,
8989 ]);
90- $ table ->addColumn ('icon ' , Type ::STRING , [
90+ $ table ->addColumn ('icon ' , Types ::STRING , [
9191 'notnull ' => false ,
9292 'length ' => 4000 ,
9393 ]);
94- $ table ->addColumn ('actions ' , Type ::TEXT , [
94+ $ table ->addColumn ('actions ' , Types ::TEXT , [
9595 'notnull ' => false ,
9696 ]);
9797 $ table ->setPrimaryKey (['notification_id ' ]);
@@ -103,36 +103,36 @@ public function changeSchema(IOutput $output, Closure $schemaClosure, array $opt
103103
104104 if (!$ schema ->hasTable ('notifications_pushtokens ' )) {
105105 $ table = $ schema ->createTable ('notifications_pushtokens ' );
106- $ table ->addColumn ('uid ' , Type ::STRING , [
106+ $ table ->addColumn ('uid ' , Types ::STRING , [
107107 'notnull ' => true ,
108108 'length ' => 64 ,
109109 ]);
110- $ table ->addColumn ('token ' , Type ::INTEGER , [
110+ $ table ->addColumn ('token ' , Types ::INTEGER , [
111111 'notnull ' => true ,
112112 'length ' => 4 ,
113113 'default ' => 0 ,
114114 ]);
115- $ table ->addColumn ('deviceidentifier ' , Type ::STRING , [
115+ $ table ->addColumn ('deviceidentifier ' , Types ::STRING , [
116116 'notnull ' => true ,
117117 'length ' => 128 ,
118118 ]);
119- $ table ->addColumn ('devicepublickey ' , Type ::STRING , [
119+ $ table ->addColumn ('devicepublickey ' , Types ::STRING , [
120120 'notnull ' => true ,
121121 'length ' => 512 ,
122122 ]);
123- $ table ->addColumn ('devicepublickeyhash ' , Type ::STRING , [
123+ $ table ->addColumn ('devicepublickeyhash ' , Types ::STRING , [
124124 'notnull ' => true ,
125125 'length ' => 128 ,
126126 ]);
127- $ table ->addColumn ('pushtokenhash ' , Type ::STRING , [
127+ $ table ->addColumn ('pushtokenhash ' , Types ::STRING , [
128128 'notnull ' => true ,
129129 'length ' => 128 ,
130130 ]);
131- $ table ->addColumn ('proxyserver ' , Type ::STRING , [
131+ $ table ->addColumn ('proxyserver ' , Types ::STRING , [
132132 'notnull ' => true ,
133133 'length ' => 256 ,
134134 ]);
135- $ table ->addColumn ('apptype ' , Type ::STRING , [
135+ $ table ->addColumn ('apptype ' , Types ::STRING , [
136136 'notnull ' => true ,
137137 'length ' => 32 ,
138138 'default ' => 'unknown ' ,
0 commit comments