@@ -142,9 +142,67 @@ i1.GeneratedColumn<String> _column_9(String aliasedName) =>
142
142
i1.GeneratedColumn <String >('theme_setting' , aliasedName, false ,
143
143
type: i1.DriftSqlType .string,
144
144
defaultValue: const CustomExpression ('\' unset\' ' ));
145
+
146
+ final class Schema4 extends i0.VersionedSchema {
147
+ Schema4 ({required super .database}) : super (version: 4 );
148
+ @override
149
+ late final List <i1.DatabaseSchemaEntity > entities = [
150
+ accounts,
151
+ globalSettings,
152
+ ];
153
+ late final Shape0 accounts = Shape0 (
154
+ source: i0.VersionedTable (
155
+ entityName: 'accounts' ,
156
+ withoutRowId: false ,
157
+ isStrict: false ,
158
+ tableConstraints: [
159
+ 'UNIQUE(realm_url, user_id)' ,
160
+ 'UNIQUE(realm_url, email)' ,
161
+ ],
162
+ columns: [
163
+ _column_0,
164
+ _column_1,
165
+ _column_2,
166
+ _column_3,
167
+ _column_4,
168
+ _column_5,
169
+ _column_6,
170
+ _column_7,
171
+ _column_8,
172
+ ],
173
+ attachedDatabase: database,
174
+ ),
175
+ alias: null );
176
+ late final Shape2 globalSettings = Shape2 (
177
+ source: i0.VersionedTable (
178
+ entityName: 'global_settings' ,
179
+ withoutRowId: false ,
180
+ isStrict: false ,
181
+ tableConstraints: [],
182
+ columns: [
183
+ _column_9,
184
+ _column_10,
185
+ ],
186
+ attachedDatabase: database,
187
+ ),
188
+ alias: null );
189
+ }
190
+
191
+ class Shape2 extends i0.VersionedTable {
192
+ Shape2 ({required super .source, required super .alias}) : super .aliased ();
193
+ i1.GeneratedColumn <String > get themeSetting =>
194
+ columnsByName['theme_setting' ]! as i1.GeneratedColumn <String >;
195
+ i1.GeneratedColumn <String > get browserPreference =>
196
+ columnsByName['browser_preference' ]! as i1.GeneratedColumn <String >;
197
+ }
198
+
199
+ i1.GeneratedColumn <String > _column_10 (String aliasedName) =>
200
+ i1.GeneratedColumn <String >('browser_preference' , aliasedName, true ,
201
+ type: i1.DriftSqlType .string);
145
202
i0.MigrationStepWithVersion migrationSteps ({
146
203
required Future <void > Function (i1.Migrator m, Schema2 schema) from1To2,
147
204
required Future <void > Function (i1.Migrator m, Schema3 schema) from2To3,
205
+ required Future <void > Function (i1.Migrator m, Schema4 schema) from3To4,
148
206
}) {
149
207
return (currentVersion, database) async {
150
208
switch (currentVersion) {
@@ -158,6 +216,11 @@ i0.MigrationStepWithVersion migrationSteps({
158
216
final migrator = i1.Migrator (database, schema);
159
217
await from2To3 (migrator, schema);
160
218
return 3 ;
219
+ case 3 :
220
+ final schema = Schema4 (database: database);
221
+ final migrator = i1.Migrator (database, schema);
222
+ await from3To4 (migrator, schema);
223
+ return 4 ;
161
224
default :
162
225
throw ArgumentError .value ('Unknown migration from $currentVersion ' );
163
226
}
@@ -167,9 +230,11 @@ i0.MigrationStepWithVersion migrationSteps({
167
230
i1.OnUpgrade stepByStep ({
168
231
required Future <void > Function (i1.Migrator m, Schema2 schema) from1To2,
169
232
required Future <void > Function (i1.Migrator m, Schema3 schema) from2To3,
233
+ required Future <void > Function (i1.Migrator m, Schema4 schema) from3To4,
170
234
}) =>
171
235
i0.VersionedSchema .stepByStepHelper (
172
236
step: migrationSteps (
173
237
from1To2: from1To2,
174
238
from2To3: from2To3,
239
+ from3To4: from3To4,
175
240
));
0 commit comments