feat: Make Shelve NuxtHub compatible #325
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes significant changes to migrate the database from PostgreSQL to SQLite, update the configuration files, and refactor the database access methods. The most important changes include modifying the
drizzle.config.ts
andnuxt.config.ts
files, updating thepackage.json
scripts and dependencies, and altering the database schema and migration files.Database Migration to SQLite:
apps/shelve/drizzle.config.ts
: Changed the database dialect from PostgreSQL to SQLite.apps/shelve/server/database/column.helpers.ts
: Updated timestamp columns to use SQLite-compatible data types and default values.apps/shelve/server/database/migrations/0000_bumpy_rockslide.sql
: Removed PostgreSQL-specific SQL statements.apps/shelve/server/database/migrations/0000_unknown_dreaming_celestial.sql
: Added new SQLite-compatible SQL statements.apps/shelve/server/database/migrations/meta/0000_snapshot.json
: Updated the migration metadata to reflect the SQLite dialect and schema changes. [1] [2] [3] [4]Configuration Updates:
apps/shelve/nuxt.config.ts
: Added OAuth configurations for GitHub and Google, and included the@nuxthub/core
module.apps/shelve/package.json
: Added a newdeploy
script and includedwrangler
in thedevDependencies
. [1] [2]Database Access Refactoring:
apps/shelve/server/api/admin/users/[id].put.ts
: Refactored to useuseDrizzle()
for database updates. (apps/shelve/server/api/admin/users/[id].put.tsL12-R12)apps/shelve/server/api/admin/users/index.get.ts
: Refactored to useuseDrizzle()
for querying users.apps/shelve/server/api/project/name/[name].get.ts
: Refactored to useuseDrizzle()
for querying projects. (apps/shelve/server/api/project/name/[name].get.tsL19-R19)resolve #324