b3a7f98e5a
CI / E2E Cloudflare (4/8) (push) Failing after 0s
CI / E2E Cloudflare (8/8) (push) Failing after 1s
CI / Lint (push) Failing after 1s
Auto Extract / Extract (push) Failing after 4s
CI / Version Check (push) Failing after 9s
CI / Integration Tests (push) Failing after 1s
CI / E2E tests (1/8) (push) Failing after 1s
CI / E2E tests (2/8) (push) Failing after 2s
CI / E2E tests (3/8) (push) Failing after 2s
CI / Browser Tests (push) Failing after 1s
CI / E2E tests (5/8) (push) Failing after 1s
CI / E2E Cloudflare (2/8) (push) Failing after 2s
CI / Typecheck (push) Failing after 1s
CI / Changeset Validation (push) Failing after 2s
CI / E2E Cloudflare (5/8) (push) Failing after 1s
CI / E2E Cloudflare (6/8) (push) Failing after 1s
CI / E2E Cloudflare (7/8) (push) Failing after 1s
CodeQL / Analyze (javascript-typescript) (push) Failing after 1s
Format / Format (push) Failing after 0s
CodeQL / Analyze (actions) (push) Failing after 4s
CI / E2E tests (4/8) (push) Failing after 1s
CI / E2E tests (6/8) (push) Failing after 1s
CI / E2E tests (7/8) (push) Failing after 2s
CI / E2E tests (8/8) (push) Failing after 1s
CI / E2E Cloudflare (1/8) (push) Failing after 1s
CI / E2E Cloudflare (3/8) (push) Failing after 2s
Preview Releases / Publish Preview (push) Failing after 0s
zizmor / Run zizmor (push) Failing after 1s
Release / Release (push) Failing after 2s
CI / Smoke Tests (push) Failing after 5m36s
CI / Tests (push) Failing after 6m36s
Release / Sync Templates (push) Has been skipped
CI / E2E Tests (push) Has been cancelled
54 lines
2.0 KiB
SQL
54 lines
2.0 KiB
SQL
-- Reset content and schema, preserving users and auth.
|
|
-- After running this, redeploy and go through the setup wizard to re-seed.
|
|
--
|
|
-- Usage: npx wrangler d1 execute emdash-demo --remote --file=scripts/reset-db.sql
|
|
--
|
|
-- NOTE: D1 may not support IF EXISTS reliably. If a table doesn't exist,
|
|
-- the statement fails and D1 aborts. Use reset-db.sh instead, which
|
|
-- discovers existing tables dynamically.
|
|
|
|
-- Drop dynamic content tables
|
|
DROP TABLE IF EXISTS ec_posts;
|
|
DROP TABLE IF EXISTS ec_pages;
|
|
|
|
-- Drop FTS virtual tables
|
|
DROP TABLE IF EXISTS ec_posts_fts;
|
|
DROP TABLE IF EXISTS ec_pages_fts;
|
|
|
|
-- Drop emdash system tables (child tables before parents)
|
|
DROP TABLE IF EXISTS _emdash_entry_taxonomies;
|
|
DROP TABLE IF EXISTS _emdash_entries;
|
|
DROP TABLE IF EXISTS _emdash_revisions;
|
|
DROP TABLE IF EXISTS _emdash_seo;
|
|
DROP TABLE IF EXISTS _emdash_comments;
|
|
DROP TABLE IF EXISTS _emdash_fields;
|
|
DROP TABLE IF EXISTS _emdash_collections;
|
|
DROP TABLE IF EXISTS _emdash_taxonomy_terms;
|
|
DROP TABLE IF EXISTS _emdash_taxonomies;
|
|
DROP TABLE IF EXISTS _emdash_media;
|
|
DROP TABLE IF EXISTS _emdash_menu_items;
|
|
DROP TABLE IF EXISTS _emdash_menus;
|
|
DROP TABLE IF EXISTS _emdash_widgets;
|
|
DROP TABLE IF EXISTS _emdash_widget_areas;
|
|
DROP TABLE IF EXISTS _emdash_sections;
|
|
DROP TABLE IF EXISTS _emdash_redirects;
|
|
DROP TABLE IF EXISTS _emdash_404_log;
|
|
DROP TABLE IF EXISTS _emdash_plugins;
|
|
DROP TABLE IF EXISTS _emdash_cron_tasks;
|
|
DROP TABLE IF EXISTS _emdash_authorization_codes;
|
|
DROP TABLE IF EXISTS _emdash_oauth_tokens;
|
|
DROP TABLE IF EXISTS _emdash_device_codes;
|
|
DROP TABLE IF EXISTS _emdash_api_tokens;
|
|
DROP TABLE IF EXISTS _emdash_oauth_clients;
|
|
|
|
-- Clear options (setup flag etc.) so the setup wizard re-runs
|
|
DROP TABLE IF EXISTS options;
|
|
|
|
-- Drop migration tracking so migrations re-run
|
|
DROP TABLE IF EXISTS _emdash_migrations;
|
|
DROP TABLE IF EXISTS _emdash_migrations_lock;
|
|
DROP TABLE IF EXISTS d1_migrations;
|
|
|
|
-- Auth tables are intentionally preserved:
|
|
-- users, passkeys, sessions, login_tokens, invites, oauth_accounts
|