Skip to content

Commit 9516c74

Browse files
committed
Use macos-14.
1 parent 8ec7734 commit 9516c74

File tree

3 files changed

+8
-15
lines changed

3 files changed

+8
-15
lines changed

.github/workflows/macos.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
build_macOS_x64:
2323
name: Building macOS x64
24-
runs-on: macos-12
24+
runs-on: macos-14
2525
steps:
2626
- uses: actions/checkout@v3
2727
with:

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ jobs:
244244
publish_macOS_x64:
245245
name: Publish macOS x64
246246
needs: [draft_release]
247-
runs-on: macos-12
247+
runs-on: macos-14
248248
steps:
249249
- uses: actions/checkout@v3
250250
with:

crates/core/src/migrations.rs

+6-13
Original file line numberDiff line numberDiff line change
@@ -172,28 +172,21 @@ VALUES(4,
172172
}
173173

174174
if current_version < 5 && target_version >= 5 {
175-
// Start by dropping all triggers on views (but not views tables).
175+
// Start by dropping all existing views and triggers (but not tables).
176176
// This is because the triggers are restructured in this version, and
177177
// need to be re-created from scratch. Not dropping them can make it
178178
// refer to tables or columns not existing anymore, which can case
179179
// issues later on.
180-
//
181-
// Similarly, dropping the views themselves can cause issues with
182-
// user-defined triggers that refer to them.
183-
//
184-
// The same applies for the down migration, except there we do drop
185-
// the views, since we cannot use the `powersync_views` view.
186-
// Down migrations are less common, so we're okay about that breaking
187-
// in some cases.
180+
// The same applies for the down migration.
188181

189182
// language=SQLite
190183
local_db
191184
.exec_safe(
192185
"\
193-
UPDATE powersync_views SET
194-
delete_trigger_sql = '',
195-
update_trigger_sql = '',
196-
insert_trigger_sql = '';
186+
SELECT powersync_drop_view(view.name)
187+
FROM sqlite_master view
188+
WHERE view.type = 'view'
189+
AND view.sql GLOB '*-- powersync-auto-generated';
197190
198191
ALTER TABLE ps_buckets RENAME TO ps_buckets_old;
199192
ALTER TABLE ps_oplog RENAME TO ps_oplog_old;

0 commit comments

Comments
 (0)