( schemaPath: string | string[], snapshot: SQLiteSchema, casing: CasingType | undefined, )
| 989 | }; |
| 990 | |
| 991 | export const prepareSQLitePush = async ( |
| 992 | schemaPath: string | string[], |
| 993 | snapshot: SQLiteSchema, |
| 994 | casing: CasingType | undefined, |
| 995 | ) => { |
| 996 | const { prev, cur } = await prepareSQLiteDbPushSnapshot(snapshot, schemaPath, casing); |
| 997 | |
| 998 | const validatedPrev = sqliteSchema.parse(prev); |
| 999 | const validatedCur = sqliteSchema.parse(cur); |
| 1000 | |
| 1001 | const squashedPrev = squashSqliteScheme(validatedPrev, 'push'); |
| 1002 | const squashedCur = squashSqliteScheme(validatedCur, 'push'); |
| 1003 | |
| 1004 | const { sqlStatements, statements, _meta } = await applySqliteSnapshotsDiff( |
| 1005 | squashedPrev, |
| 1006 | squashedCur, |
| 1007 | tablesResolver, |
| 1008 | columnsResolver, |
| 1009 | sqliteViewsResolver, |
| 1010 | validatedPrev, |
| 1011 | validatedCur, |
| 1012 | 'push', |
| 1013 | ); |
| 1014 | |
| 1015 | return { |
| 1016 | sqlStatements, |
| 1017 | statements, |
| 1018 | squashedPrev, |
| 1019 | squashedCur, |
| 1020 | meta: _meta, |
| 1021 | }; |
| 1022 | }; |
| 1023 | |
| 1024 | export const prepareLibSQLPush = async ( |
| 1025 | schemaPath: string | string[], |
no test coverage detected