mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-06 03:00:16 -04:00
Merge branch 'staging' into feat/impersonation
This commit is contained in:
2
packages/db/migrations/0142_short_nicolaos.sql
Normal file
2
packages/db/migrations/0142_short_nicolaos.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE "settings" ALTER COLUMN "theme" SET DEFAULT 'dark';--> statement-breakpoint
|
||||
ALTER TABLE "settings" ADD COLUMN "show_action_bar" boolean DEFAULT true NOT NULL;
|
||||
2
packages/db/migrations/0143_puzzling_xorn.sql
Normal file
2
packages/db/migrations/0143_puzzling_xorn.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE "permission_group" ADD COLUMN "auto_add_new_members" boolean DEFAULT false NOT NULL;--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX "permission_group_org_auto_add_unique" ON "permission_group" USING btree ("organization_id") WHERE auto_add_new_members = true;
|
||||
10274
packages/db/migrations/meta/0142_snapshot.json
Normal file
10274
packages/db/migrations/meta/0142_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
10297
packages/db/migrations/meta/0143_snapshot.json
Normal file
10297
packages/db/migrations/meta/0143_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -988,6 +988,20 @@
|
||||
"when": 1768421319400,
|
||||
"tag": "0141_daffy_marten_broadcloak",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 142,
|
||||
"version": "7",
|
||||
"when": 1768511699652,
|
||||
"tag": "0142_short_nicolaos",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 143,
|
||||
"version": "7",
|
||||
"when": 1768518143986,
|
||||
"tag": "0143_puzzling_xorn",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -453,7 +453,7 @@ export const settings = pgTable('settings', {
|
||||
.unique(), // One settings record per user
|
||||
|
||||
// General settings
|
||||
theme: text('theme').notNull().default('system'),
|
||||
theme: text('theme').notNull().default('dark'),
|
||||
autoConnect: boolean('auto_connect').notNull().default(true),
|
||||
|
||||
// Privacy settings
|
||||
@@ -476,6 +476,7 @@ export const settings = pgTable('settings', {
|
||||
|
||||
// Canvas preferences
|
||||
snapToGridSize: integer('snap_to_grid_size').notNull().default(0), // 0 = off, 10-50 = grid size
|
||||
showActionBar: boolean('show_action_bar').notNull().default(true),
|
||||
|
||||
// Copilot preferences - maps model_id to enabled/disabled boolean
|
||||
copilotEnabledModels: jsonb('copilot_enabled_models').notNull().default('{}'),
|
||||
@@ -2080,6 +2081,7 @@ export const permissionGroup = pgTable(
|
||||
.references(() => user.id, { onDelete: 'cascade' }),
|
||||
createdAt: timestamp('created_at').notNull().defaultNow(),
|
||||
updatedAt: timestamp('updated_at').notNull().defaultNow(),
|
||||
autoAddNewMembers: boolean('auto_add_new_members').notNull().default(false),
|
||||
},
|
||||
(table) => ({
|
||||
organizationIdIdx: index('permission_group_organization_id_idx').on(table.organizationId),
|
||||
@@ -2088,6 +2090,9 @@ export const permissionGroup = pgTable(
|
||||
table.organizationId,
|
||||
table.name
|
||||
),
|
||||
autoAddNewMembersUnique: uniqueIndex('permission_group_org_auto_add_unique')
|
||||
.on(table.organizationId)
|
||||
.where(sql`auto_add_new_members = true`),
|
||||
})
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user