Skip to content

Commit 33dd59f

Browse files
authored
fix(db-consts): make the migrations image fully standalone by adding db consts (#1087)
1 parent 53ee9f9 commit 33dd59f

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

apps/sim/db/consts.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Database-only constants used in schema definitions and migrations.
3+
* These constants are independent of application logic to keep migrations container lightweight.
4+
*/
5+
6+
/**
7+
* Default free credits (in dollars) for new users
8+
*/
9+
export const DEFAULT_FREE_CREDITS = 10
10+
11+
/**
12+
* Tag slots available for knowledge base documents and embeddings
13+
*/
14+
export const TAG_SLOTS = ['tag1', 'tag2', 'tag3', 'tag4', 'tag5', 'tag6', 'tag7'] as const
15+
16+
/**
17+
* Type for tag slot names
18+
*/
19+
export type TagSlot = (typeof TAG_SLOTS)[number]

apps/sim/db/schema.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ import {
1616
uuid,
1717
vector,
1818
} from 'drizzle-orm/pg-core'
19-
import { DEFAULT_FREE_CREDITS } from '@/lib/billing/constants'
20-
import { TAG_SLOTS } from '@/lib/constants/knowledge'
19+
import { DEFAULT_FREE_CREDITS, TAG_SLOTS } from './consts'
2120

2221
// Custom tsvector type for full-text search
2322
export const tsvector = customType<{

0 commit comments

Comments
 (0)