mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-14 12:02:27 +08:00
19 lines
477 B
Go
19 lines
477 B
Go
package migrations
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestGroupForceOpenAIFastMigration(t *testing.T) {
|
|
content, err := FS.ReadFile("232_group_force_openai_fast.sql")
|
|
require.NoError(t, err)
|
|
|
|
sql := strings.Join(strings.Fields(string(content)), " ")
|
|
require.Contains(t, sql,
|
|
"ADD COLUMN IF NOT EXISTS force_openai_fast BOOLEAN NOT NULL DEFAULT FALSE")
|
|
require.Contains(t, sql, "COMMENT ON COLUMN groups.force_openai_fast")
|
|
}
|