* Introduce project_personas table with foreign keys to projects and agent_personas * Add project_skills table with foreign key to projects and agent_skills * Include override boolean field in agent_persona_skills and project_skills * Update schema and migration files to reflect new tables and fields * Enhance CORS handling to reflect request origin
This commit is contained in:
+1
@@ -50,6 +50,7 @@ func New(opts ...DialectOption) *Dialect {
|
||||
feature.Output |
|
||||
feature.OffsetFetch |
|
||||
feature.FKDefaultOnAction |
|
||||
feature.Merge |
|
||||
feature.UpdateFromTable |
|
||||
feature.MSSavepoint
|
||||
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@ package mssqldialect
|
||||
|
||||
// Version is the current release version.
|
||||
func Version() string {
|
||||
return "1.2.16"
|
||||
return "1.2.18"
|
||||
}
|
||||
|
||||
+3
-1
@@ -57,8 +57,10 @@ func New(opts ...DialectOption) *Dialect {
|
||||
feature.CompositeIn |
|
||||
feature.FKDefaultOnAction |
|
||||
feature.DeleteReturning |
|
||||
feature.Merge |
|
||||
feature.MergeReturning |
|
||||
feature.AlterColumnExists
|
||||
feature.AlterColumnExists |
|
||||
feature.CreateIndexIfNotExists
|
||||
|
||||
for _, opt := range opts {
|
||||
opt(d)
|
||||
|
||||
+5
-5
@@ -38,17 +38,17 @@ func (in *Inspector) Inspect(ctx context.Context) (sqlschema.Database, error) {
|
||||
|
||||
exclude := in.ExcludeTables
|
||||
if len(exclude) == 0 {
|
||||
// Avoid getting NOT LIKE ALL (ARRAY[NULL]) if bun.In() is called with an empty slice.
|
||||
// Avoid getting NOT LIKE ALL (ARRAY[NULL]) if bun.List() is called with an empty slice.
|
||||
exclude = []string{""}
|
||||
}
|
||||
|
||||
var tables []*InformationSchemaTable
|
||||
if err := in.db.NewRaw(sqlInspectTables, in.SchemaName, bun.In(exclude)).Scan(ctx, &tables); err != nil {
|
||||
if err := in.db.NewRaw(sqlInspectTables, in.SchemaName, bun.List(exclude)).Scan(ctx, &tables); err != nil {
|
||||
return dbSchema, err
|
||||
}
|
||||
|
||||
var fks []*ForeignKey
|
||||
if err := in.db.NewRaw(sqlInspectForeignKeys, in.SchemaName, bun.In(exclude), bun.In(exclude)).Scan(ctx, &fks); err != nil {
|
||||
if err := in.db.NewRaw(sqlInspectForeignKeys, in.SchemaName, bun.List(exclude), bun.List(exclude)).Scan(ctx, &fks); err != nil {
|
||||
return dbSchema, err
|
||||
}
|
||||
dbSchema.ForeignKeys = make(map[sqlschema.ForeignKey]string, len(fks))
|
||||
@@ -165,7 +165,7 @@ type PrimaryKey struct {
|
||||
|
||||
const (
|
||||
// sqlInspectTables retrieves all user-defined tables in the selected schema.
|
||||
// Pass bun.In([]string{...}) to exclude tables from this inspection or bun.In([]string{''}) to include all results.
|
||||
// Pass bun.List([]string{...}) to exclude tables from this inspection or bun.List([]string{''}) to include all results.
|
||||
sqlInspectTables = `
|
||||
SELECT
|
||||
"t".table_schema,
|
||||
@@ -258,7 +258,7 @@ ORDER BY "table_schema", "table_name", "column_name"
|
||||
`
|
||||
|
||||
// sqlInspectForeignKeys get FK definitions for user-defined tables.
|
||||
// Pass bun.In([]string{...}) to exclude tables from this inspection or bun.In([]string{''}) to include all results.
|
||||
// Pass bun.List([]string{...}) to exclude tables from this inspection or bun.List([]string{''}) to include all results.
|
||||
sqlInspectForeignKeys = `
|
||||
WITH
|
||||
"schemas" AS (
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@ package pgdialect
|
||||
|
||||
// Version is the current release version.
|
||||
func Version() string {
|
||||
return "1.2.16"
|
||||
return "1.2.18"
|
||||
}
|
||||
|
||||
+2
-1
@@ -42,7 +42,8 @@ func New(opts ...DialectOption) *Dialect {
|
||||
feature.AutoIncrement |
|
||||
feature.CompositeIn |
|
||||
feature.FKDefaultOnAction |
|
||||
feature.DeleteReturning
|
||||
feature.DeleteReturning |
|
||||
feature.CreateIndexIfNotExists
|
||||
|
||||
for _, opt := range opts {
|
||||
opt(d)
|
||||
|
||||
+1
-1
@@ -2,5 +2,5 @@ package sqlitedialect
|
||||
|
||||
// Version is the current release version.
|
||||
func Version() string {
|
||||
return "1.2.16"
|
||||
return "1.2.18"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user