Stigin
Stigin
Explore posts from servers
CDCloudflare Developers
Created by Stigin on 7/10/2024 in #pages-help
Is there a PUT Secret API call for cloudflare for Pages?
Hi guys - as the title points out - i've checked out api.cloudflare etc but no dice. I need to store env variables provided by the user.
28 replies
DTDrizzle Team
Created by Stigin on 6/13/2024 in #help
D1 Failing Migraton on Prod
import type { Config } from 'drizzle-kit';

export default {
schema: 'src/lib/db/schema.ts',
out: 'migrations',
dialect: 'sqlite',
dbCredentials: {
wranglerConfigPath: 'wrangler.toml',
url: '.wrangler/state/v3/d1/miniflare-D1DatabaseObject/34ef4850cc5e4f26e767cd5ae08b398d6f9e9215b83406a22b3e5e1ba038b491.sqlite',
dbName: 'vertex',
bindingName: 'DB'
}
} satisfies Config;
import type { Config } from 'drizzle-kit';

export default {
schema: 'src/lib/db/schema.ts',
out: 'migrations',
dialect: 'sqlite',
dbCredentials: {
wranglerConfigPath: 'wrangler.toml',
url: '.wrangler/state/v3/d1/miniflare-D1DatabaseObject/34ef4850cc5e4f26e767cd5ae08b398d6f9e9215b83406a22b3e5e1ba038b491.sqlite',
dbName: 'vertex',
bindingName: 'DB'
}
} satisfies Config;
➜ vertex git:(main) ✗ bun run d1:gen
$ drizzle-kit generate --config=drizzle.config.ts
drizzle-kit: v0.22.7
drizzle-orm: v0.31.2

Reading config file '/Users/alexg/Desktop/vertex/drizzle.config.ts'
1 tables
products 3 columns 0 indexes 0 fks

[✓] Your SQL migration file ➜ migrations/0000_soft_stellaris.sql :rocket:
➜ vertex git:(main) ✗ bun run d1:mig:local
$ wrangler d1 migrations apply vertex --local

⛅️ wrangler 3.60.2
-------------------

Migrations to be applied:
┌─────────────────────────┐
│ name │
├─────────────────────────┤
│ 0000_soft_stellaris.sql │
└─────────────────────────┘
✔ About to apply 1 migration(s)
Your database may not be available to serve requests during the migration, continue? … yes
:cyclone: Executing on local database vertex (23e8bef3-b7e0-4e9e-94ef-447a3b77361b) from .wrangler/state/v3/d1:
:cyclone: To execute on your remote database, add a --remote flag to your wrangler command.
┌─────────────────────────┬────────┐
│ name │ status │
├─────────────────────────┼────────┤
│ 0000_soft_stellaris.sql │ :white_check_mark: │
└─────────────────────────┴────────┘
➜ vertex git:(main) ✗ bun run d1:mig:prod
$ wrangler d1 migrations apply vertex

⛅️ wrangler 3.60.2
-------------------

:white_check_mark: No migrations to apply!
➜ vertex git:(main) ✗ bun run d1:gen
$ drizzle-kit generate --config=drizzle.config.ts
drizzle-kit: v0.22.7
drizzle-orm: v0.31.2

Reading config file '/Users/alexg/Desktop/vertex/drizzle.config.ts'
1 tables
products 3 columns 0 indexes 0 fks

[✓] Your SQL migration file ➜ migrations/0000_soft_stellaris.sql :rocket:
➜ vertex git:(main) ✗ bun run d1:mig:local
$ wrangler d1 migrations apply vertex --local

⛅️ wrangler 3.60.2
-------------------

Migrations to be applied:
┌─────────────────────────┐
│ name │
├─────────────────────────┤
│ 0000_soft_stellaris.sql │
└─────────────────────────┘
✔ About to apply 1 migration(s)
Your database may not be available to serve requests during the migration, continue? … yes
:cyclone: Executing on local database vertex (23e8bef3-b7e0-4e9e-94ef-447a3b77361b) from .wrangler/state/v3/d1:
:cyclone: To execute on your remote database, add a --remote flag to your wrangler command.
┌─────────────────────────┬────────┐
│ name │ status │
├─────────────────────────┼────────┤
│ 0000_soft_stellaris.sql │ :white_check_mark: │
└─────────────────────────┴────────┘
➜ vertex git:(main) ✗ bun run d1:mig:prod
$ wrangler d1 migrations apply vertex

⛅️ wrangler 3.60.2
-------------------

:white_check_mark: No migrations to apply!
3 replies