package bootstrapimpl

import "testing"

func TestSystemTablesIncludeTriggerSubscription(t *testing.T) {
	defs := GetSystemTableDefinitions()
	for _, def := range defs {
		if def.TableName == "_System_TriggerSubscription" {
			for _, col := range def.Columns {
				if col.Name == "KeyPrefix" {
					if col.CollationName != "utf8mb4_bin" {
						t.Fatalf("_System_TriggerSubscription.KeyPrefix collation = %q, want utf8mb4_bin", col.CollationName)
					}
					return
				}
			}
			t.Fatal("_System_TriggerSubscription.KeyPrefix missing from system_tables.json")
			return
		}
	}
	t.Fatal("_System_TriggerSubscription missing from system_tables.json")
}
