feat: add new snapshot for version 6 with updated schema and relationships
All checks were successful
Build Docker Image / build (push) Successful in 1m23s
All checks were successful
Build Docker Image / build (push) Successful in 1m23s
- Created a new snapshot file for version 6 of the database schema. - Added tables for arc, character, characterHistory, characterOverride, characterScrapeValidation, config, devilFruit, userCharacterHistory, account, session, user, and verification with appropriate columns and constraints. - Updated the journal to include new entries for version 6. - Modified the userCharacterHistory table to enforce unique constraints on userId and characterHistoryId. - Enhanced daily game logic to track user attempts and prevent duplicate entries for the same day.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { integer, sqliteTable, text, real } from 'drizzle-orm/sqlite-core';
|
||||
import { integer, sqliteTable, text, real, unique } from 'drizzle-orm/sqlite-core';
|
||||
import { user } from './auth.schema';
|
||||
|
||||
// Define devil fruit types
|
||||
@@ -116,7 +116,9 @@ export const userCharacterHistory = sqliteTable('userCharacterHistory', {
|
||||
characterHistoryId: text('characterHistoryId').references(() => characterHistory.id),
|
||||
tryCount: integer('tryCount').notNull(),
|
||||
createdAt: integer('createdAt').notNull().$default(() => Date.now())
|
||||
});
|
||||
}, (table) => [
|
||||
unique().on(table.userId, table.characterHistoryId)
|
||||
]);
|
||||
|
||||
|
||||
export * from './auth.schema';
|
||||
|
||||
Reference in New Issue
Block a user