migrate

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// WithGlobalUniqueID sets the universal ids options to the migration.
	// If this option is enabled, ent migration will allocate a 1<<32 range
	// for the ids of each entity (table).
	// Note that this option cannot be applied on tables that already exist.
	WithGlobalUniqueID = schema.WithGlobalUniqueID
	// WithDropColumn sets the drop column option to the migration.
	// If this option is enabled, ent migration will drop old columns
	// that were used for both fields and edges. This defaults to false.
	WithDropColumn = schema.WithDropColumn
	// WithDropIndex sets the drop index option to the migration.
	// If this option is enabled, ent migration will drop old indexes
	// that were defined in the schema. This defaults to false.
	// Note that unique constraints are defined using `UNIQUE INDEX`,
	// and therefore, it's recommended to enable this option to get more
	// flexibility in the schema changes.
	WithDropIndex = schema.WithDropIndex
	// WithForeignKeys enables creating foreign-key in schema DDL. This defaults to true.
	WithForeignKeys = schema.WithForeignKeys
)
View Source
var (
	// APITokensColumns holds the columns for the "api_tokens" table.
	APITokensColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "name", Type: field.TypeString},
		{Name: "token", Type: field.TypeString, Unique: true},
		{Name: "expires_at", Type: field.TypeTime, Nullable: true},
		{Name: "description", Type: field.TypeString, Nullable: true},
		{Name: "scopes", Type: field.TypeJSON, Nullable: true},
		{Name: "last_used_at", Type: field.TypeTime, Nullable: true},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
	}
	// APITokensTable holds the schema information for the "api_tokens" table.
	APITokensTable = &schema.Table{
		Name:       "api_tokens",
		Columns:    APITokensColumns,
		PrimaryKey: []*schema.Column{APITokensColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "api_tokens_organizations_api_tokens",
				Columns:    []*schema.Column{APITokensColumns[15]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.SetNull,
			},
		},
		Indexes: []*schema.Index{
			{
				Name:    "apitoken_token",
				Unique:  false,
				Columns: []*schema.Column{APITokensColumns[10]},
			},
		},
	}
	// ContactsColumns holds the columns for the "contacts" table.
	ContactsColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "full_name", Type: field.TypeString, Size: 64},
		{Name: "title", Type: field.TypeString, Nullable: true},
		{Name: "company", Type: field.TypeString, Nullable: true},
		{Name: "email", Type: field.TypeString, Nullable: true},
		{Name: "phone_number", Type: field.TypeString, Nullable: true},
		{Name: "address", Type: field.TypeString, Nullable: true},
		{Name: "status", Type: field.TypeEnum, Enums: []string{"ACTIVE", "INACTIVE", "DEACTIVATED", "SUSPENDED", "ONBOARDING"}, Default: "ACTIVE"},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
	}
	// ContactsTable holds the schema information for the "contacts" table.
	ContactsTable = &schema.Table{
		Name:       "contacts",
		Columns:    ContactsColumns,
		PrimaryKey: []*schema.Column{ContactsColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "contacts_organizations_contacts",
				Columns:    []*schema.Column{ContactsColumns[16]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.SetNull,
			},
		},
	}
	// ContactHistoryColumns holds the columns for the "contact_history" table.
	ContactHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
		{Name: "full_name", Type: field.TypeString, Size: 64},
		{Name: "title", Type: field.TypeString, Nullable: true},
		{Name: "company", Type: field.TypeString, Nullable: true},
		{Name: "email", Type: field.TypeString, Nullable: true},
		{Name: "phone_number", Type: field.TypeString, Nullable: true},
		{Name: "address", Type: field.TypeString, Nullable: true},
		{Name: "status", Type: field.TypeEnum, Enums: []string{"ACTIVE", "INACTIVE", "DEACTIVATED", "SUSPENDED", "ONBOARDING"}, Default: "ACTIVE"},
	}
	// ContactHistoryTable holds the schema information for the "contact_history" table.
	ContactHistoryTable = &schema.Table{
		Name:       "contact_history",
		Columns:    ContactHistoryColumns,
		PrimaryKey: []*schema.Column{ContactHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "contacthistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{ContactHistoryColumns[1]},
			},
		},
	}
	// DocumentDataColumns holds the columns for the "document_data" table.
	DocumentDataColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "data", Type: field.TypeJSON},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
		{Name: "template_id", Type: field.TypeString},
	}
	// DocumentDataTable holds the schema information for the "document_data" table.
	DocumentDataTable = &schema.Table{
		Name:       "document_data",
		Columns:    DocumentDataColumns,
		PrimaryKey: []*schema.Column{DocumentDataColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "document_data_organizations_documentdata",
				Columns:    []*schema.Column{DocumentDataColumns[10]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.SetNull,
			},
			{
				Symbol:     "document_data_templates_documents",
				Columns:    []*schema.Column{DocumentDataColumns[11]},
				RefColumns: []*schema.Column{TemplatesColumns[0]},
				OnDelete:   schema.NoAction,
			},
		},
	}
	// DocumentDataHistoryColumns holds the columns for the "document_data_history" table.
	DocumentDataHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
		{Name: "template_id", Type: field.TypeString},
		{Name: "data", Type: field.TypeJSON},
	}
	// DocumentDataHistoryTable holds the schema information for the "document_data_history" table.
	DocumentDataHistoryTable = &schema.Table{
		Name:       "document_data_history",
		Columns:    DocumentDataHistoryColumns,
		PrimaryKey: []*schema.Column{DocumentDataHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "documentdatahistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{DocumentDataHistoryColumns[1]},
			},
		},
	}
	// EmailVerificationTokensColumns holds the columns for the "email_verification_tokens" table.
	EmailVerificationTokensColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "token", Type: field.TypeString, Unique: true},
		{Name: "ttl", Type: field.TypeTime},
		{Name: "email", Type: field.TypeString},
		{Name: "secret", Type: field.TypeBytes},
		{Name: "owner_id", Type: field.TypeString},
	}
	// EmailVerificationTokensTable holds the schema information for the "email_verification_tokens" table.
	EmailVerificationTokensTable = &schema.Table{
		Name:       "email_verification_tokens",
		Columns:    EmailVerificationTokensColumns,
		PrimaryKey: []*schema.Column{EmailVerificationTokensColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "email_verification_tokens_users_email_verification_tokens",
				Columns:    []*schema.Column{EmailVerificationTokensColumns[12]},
				RefColumns: []*schema.Column{UsersColumns[0]},
				OnDelete:   schema.NoAction,
			},
		},
		Indexes: []*schema.Index{
			{
				Name:    "emailverificationtoken_token",
				Unique:  true,
				Columns: []*schema.Column{EmailVerificationTokensColumns[8]},
				Annotation: &entsql.IndexAnnotation{
					Where: "deleted_at is NULL",
				},
			},
		},
	}
	// EntitlementsColumns holds the columns for the "entitlements" table.
	EntitlementsColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "external_customer_id", Type: field.TypeString, Nullable: true},
		{Name: "external_subscription_id", Type: field.TypeString, Nullable: true},
		{Name: "expires", Type: field.TypeBool, Default: false},
		{Name: "expires_at", Type: field.TypeTime, Nullable: true},
		{Name: "cancelled", Type: field.TypeBool, Default: false},
		{Name: "plan_id", Type: field.TypeString},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
		{Name: "organization_id", Type: field.TypeString},
	}
	// EntitlementsTable holds the schema information for the "entitlements" table.
	EntitlementsTable = &schema.Table{
		Name:       "entitlements",
		Columns:    EntitlementsColumns,
		PrimaryKey: []*schema.Column{EntitlementsColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "entitlements_entitlement_plans_entitlements",
				Columns:    []*schema.Column{EntitlementsColumns[14]},
				RefColumns: []*schema.Column{EntitlementPlansColumns[0]},
				OnDelete:   schema.NoAction,
			},
			{
				Symbol:     "entitlements_organizations_entitlements",
				Columns:    []*schema.Column{EntitlementsColumns[15]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.SetNull,
			},
			{
				Symbol:     "entitlements_organizations_organization_entitlement",
				Columns:    []*schema.Column{EntitlementsColumns[16]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.NoAction,
			},
		},
		Indexes: []*schema.Index{
			{
				Name:    "entitlement_organization_id_owner_id",
				Unique:  true,
				Columns: []*schema.Column{EntitlementsColumns[16], EntitlementsColumns[15]},
				Annotation: &entsql.IndexAnnotation{
					Where: "deleted_at is NULL and cancelled = false",
				},
			},
		},
	}
	// EntitlementHistoryColumns holds the columns for the "entitlement_history" table.
	EntitlementHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
		{Name: "plan_id", Type: field.TypeString},
		{Name: "organization_id", Type: field.TypeString},
		{Name: "external_customer_id", Type: field.TypeString, Nullable: true},
		{Name: "external_subscription_id", Type: field.TypeString, Nullable: true},
		{Name: "expires", Type: field.TypeBool, Default: false},
		{Name: "expires_at", Type: field.TypeTime, Nullable: true},
		{Name: "cancelled", Type: field.TypeBool, Default: false},
	}
	// EntitlementHistoryTable holds the schema information for the "entitlement_history" table.
	EntitlementHistoryTable = &schema.Table{
		Name:       "entitlement_history",
		Columns:    EntitlementHistoryColumns,
		PrimaryKey: []*schema.Column{EntitlementHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "entitlementhistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{EntitlementHistoryColumns[1]},
			},
		},
	}
	// EntitlementPlansColumns holds the columns for the "entitlement_plans" table.
	EntitlementPlansColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "display_name", Type: field.TypeString, Nullable: true},
		{Name: "name", Type: field.TypeString},
		{Name: "description", Type: field.TypeString, Nullable: true},
		{Name: "version", Type: field.TypeString},
		{Name: "metadata", Type: field.TypeJSON, Nullable: true},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
	}
	// EntitlementPlansTable holds the schema information for the "entitlement_plans" table.
	EntitlementPlansTable = &schema.Table{
		Name:       "entitlement_plans",
		Columns:    EntitlementPlansColumns,
		PrimaryKey: []*schema.Column{EntitlementPlansColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "entitlement_plans_organizations_entitlementplans",
				Columns:    []*schema.Column{EntitlementPlansColumns[14]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.SetNull,
			},
		},
		Indexes: []*schema.Index{
			{
				Name:    "entitlementplan_name_version_owner_id",
				Unique:  true,
				Columns: []*schema.Column{EntitlementPlansColumns[10], EntitlementPlansColumns[12], EntitlementPlansColumns[14]},
				Annotation: &entsql.IndexAnnotation{
					Where: "deleted_at is NULL",
				},
			},
		},
	}
	// EntitlementPlanFeaturesColumns holds the columns for the "entitlement_plan_features" table.
	EntitlementPlanFeaturesColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "metadata", Type: field.TypeJSON, Nullable: true},
		{Name: "plan_id", Type: field.TypeString},
		{Name: "feature_id", Type: field.TypeString},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
	}
	// EntitlementPlanFeaturesTable holds the schema information for the "entitlement_plan_features" table.
	EntitlementPlanFeaturesTable = &schema.Table{
		Name:       "entitlement_plan_features",
		Columns:    EntitlementPlanFeaturesColumns,
		PrimaryKey: []*schema.Column{EntitlementPlanFeaturesColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "entitlement_plan_features_entitlement_plans_plan",
				Columns:    []*schema.Column{EntitlementPlanFeaturesColumns[10]},
				RefColumns: []*schema.Column{EntitlementPlansColumns[0]},
				OnDelete:   schema.NoAction,
			},
			{
				Symbol:     "entitlement_plan_features_features_feature",
				Columns:    []*schema.Column{EntitlementPlanFeaturesColumns[11]},
				RefColumns: []*schema.Column{FeaturesColumns[0]},
				OnDelete:   schema.NoAction,
			},
			{
				Symbol:     "entitlement_plan_features_organizations_entitlementplanfeatures",
				Columns:    []*schema.Column{EntitlementPlanFeaturesColumns[12]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.SetNull,
			},
		},
		Indexes: []*schema.Index{
			{
				Name:    "entitlementplanfeature_feature_id_plan_id",
				Unique:  true,
				Columns: []*schema.Column{EntitlementPlanFeaturesColumns[11], EntitlementPlanFeaturesColumns[10]},
				Annotation: &entsql.IndexAnnotation{
					Where: "deleted_at is NULL",
				},
			},
		},
	}
	// EntitlementPlanFeatureHistoryColumns holds the columns for the "entitlement_plan_feature_history" table.
	EntitlementPlanFeatureHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
		{Name: "metadata", Type: field.TypeJSON, Nullable: true},
		{Name: "plan_id", Type: field.TypeString},
		{Name: "feature_id", Type: field.TypeString},
	}
	// EntitlementPlanFeatureHistoryTable holds the schema information for the "entitlement_plan_feature_history" table.
	EntitlementPlanFeatureHistoryTable = &schema.Table{
		Name:       "entitlement_plan_feature_history",
		Columns:    EntitlementPlanFeatureHistoryColumns,
		PrimaryKey: []*schema.Column{EntitlementPlanFeatureHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "entitlementplanfeaturehistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{EntitlementPlanFeatureHistoryColumns[1]},
			},
		},
	}
	// EntitlementPlanHistoryColumns holds the columns for the "entitlement_plan_history" table.
	EntitlementPlanHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
		{Name: "display_name", Type: field.TypeString, Nullable: true},
		{Name: "name", Type: field.TypeString},
		{Name: "description", Type: field.TypeString, Nullable: true},
		{Name: "version", Type: field.TypeString},
		{Name: "metadata", Type: field.TypeJSON, Nullable: true},
	}
	// EntitlementPlanHistoryTable holds the schema information for the "entitlement_plan_history" table.
	EntitlementPlanHistoryTable = &schema.Table{
		Name:       "entitlement_plan_history",
		Columns:    EntitlementPlanHistoryColumns,
		PrimaryKey: []*schema.Column{EntitlementPlanHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "entitlementplanhistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{EntitlementPlanHistoryColumns[1]},
			},
		},
	}
	// EntitiesColumns holds the columns for the "entities" table.
	EntitiesColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "name", Type: field.TypeString, Nullable: true, Size: 160},
		{Name: "display_name", Type: field.TypeString, Nullable: true, Size: 64},
		{Name: "description", Type: field.TypeString, Nullable: true},
		{Name: "domains", Type: field.TypeJSON, Nullable: true},
		{Name: "status", Type: field.TypeString, Nullable: true, Default: "active"},
		{Name: "entity_type_id", Type: field.TypeString, Nullable: true},
		{Name: "entity_type_entities", Type: field.TypeString, Nullable: true},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
	}
	// EntitiesTable holds the schema information for the "entities" table.
	EntitiesTable = &schema.Table{
		Name:       "entities",
		Columns:    EntitiesColumns,
		PrimaryKey: []*schema.Column{EntitiesColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "entities_entity_types_entity_type",
				Columns:    []*schema.Column{EntitiesColumns[14]},
				RefColumns: []*schema.Column{EntityTypesColumns[0]},
				OnDelete:   schema.SetNull,
			},
			{
				Symbol:     "entities_entity_types_entities",
				Columns:    []*schema.Column{EntitiesColumns[15]},
				RefColumns: []*schema.Column{EntityTypesColumns[0]},
				OnDelete:   schema.SetNull,
			},
			{
				Symbol:     "entities_organizations_entities",
				Columns:    []*schema.Column{EntitiesColumns[16]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.SetNull,
			},
		},
		Indexes: []*schema.Index{
			{
				Name:    "entity_name_owner_id",
				Unique:  true,
				Columns: []*schema.Column{EntitiesColumns[9], EntitiesColumns[16]},
				Annotation: &entsql.IndexAnnotation{
					Where: "deleted_at is NULL",
				},
			},
		},
	}
	// EntityHistoryColumns holds the columns for the "entity_history" table.
	EntityHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
		{Name: "name", Type: field.TypeString, Nullable: true, Size: 160},
		{Name: "display_name", Type: field.TypeString, Nullable: true, Size: 64},
		{Name: "description", Type: field.TypeString, Nullable: true},
		{Name: "domains", Type: field.TypeJSON, Nullable: true},
		{Name: "entity_type_id", Type: field.TypeString, Nullable: true},
		{Name: "status", Type: field.TypeString, Nullable: true, Default: "active"},
	}
	// EntityHistoryTable holds the schema information for the "entity_history" table.
	EntityHistoryTable = &schema.Table{
		Name:       "entity_history",
		Columns:    EntityHistoryColumns,
		PrimaryKey: []*schema.Column{EntityHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "entityhistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{EntityHistoryColumns[1]},
			},
		},
	}
	// EntityTypesColumns holds the columns for the "entity_types" table.
	EntityTypesColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "name", Type: field.TypeString, Size: 64},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
	}
	// EntityTypesTable holds the schema information for the "entity_types" table.
	EntityTypesTable = &schema.Table{
		Name:       "entity_types",
		Columns:    EntityTypesColumns,
		PrimaryKey: []*schema.Column{EntityTypesColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "entity_types_organizations_entitytypes",
				Columns:    []*schema.Column{EntityTypesColumns[10]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.SetNull,
			},
		},
		Indexes: []*schema.Index{
			{
				Name:    "entitytype_name_owner_id",
				Unique:  true,
				Columns: []*schema.Column{EntityTypesColumns[9], EntityTypesColumns[10]},
				Annotation: &entsql.IndexAnnotation{
					Where: "deleted_at is NULL",
				},
			},
		},
	}
	// EntityTypeHistoryColumns holds the columns for the "entity_type_history" table.
	EntityTypeHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
		{Name: "name", Type: field.TypeString, Size: 64},
	}
	// EntityTypeHistoryTable holds the schema information for the "entity_type_history" table.
	EntityTypeHistoryTable = &schema.Table{
		Name:       "entity_type_history",
		Columns:    EntityTypeHistoryColumns,
		PrimaryKey: []*schema.Column{EntityTypeHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "entitytypehistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{EntityTypeHistoryColumns[1]},
			},
		},
	}
	// EventsColumns holds the columns for the "events" table.
	EventsColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "event_id", Type: field.TypeString, Nullable: true},
		{Name: "correlation_id", Type: field.TypeString, Nullable: true},
		{Name: "event_type", Type: field.TypeString},
		{Name: "metadata", Type: field.TypeJSON, Nullable: true},
	}
	// EventsTable holds the schema information for the "events" table.
	EventsTable = &schema.Table{
		Name:       "events",
		Columns:    EventsColumns,
		PrimaryKey: []*schema.Column{EventsColumns[0]},
	}
	// EventHistoryColumns holds the columns for the "event_history" table.
	EventHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "event_id", Type: field.TypeString, Nullable: true},
		{Name: "correlation_id", Type: field.TypeString, Nullable: true},
		{Name: "event_type", Type: field.TypeString},
		{Name: "metadata", Type: field.TypeJSON, Nullable: true},
	}
	// EventHistoryTable holds the schema information for the "event_history" table.
	EventHistoryTable = &schema.Table{
		Name:       "event_history",
		Columns:    EventHistoryColumns,
		PrimaryKey: []*schema.Column{EventHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "eventhistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{EventHistoryColumns[1]},
			},
		},
	}
	// FeaturesColumns holds the columns for the "features" table.
	FeaturesColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "name", Type: field.TypeString},
		{Name: "display_name", Type: field.TypeString, Nullable: true},
		{Name: "enabled", Type: field.TypeBool, Default: false},
		{Name: "description", Type: field.TypeString, Nullable: true},
		{Name: "metadata", Type: field.TypeJSON, Nullable: true},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
	}
	// FeaturesTable holds the schema information for the "features" table.
	FeaturesTable = &schema.Table{
		Name:       "features",
		Columns:    FeaturesColumns,
		PrimaryKey: []*schema.Column{FeaturesColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "features_organizations_features",
				Columns:    []*schema.Column{FeaturesColumns[14]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.SetNull,
			},
		},
		Indexes: []*schema.Index{
			{
				Name:    "feature_name_owner_id",
				Unique:  true,
				Columns: []*schema.Column{FeaturesColumns[9], FeaturesColumns[14]},
				Annotation: &entsql.IndexAnnotation{
					Where: "deleted_at is NULL",
				},
			},
		},
	}
	// FeatureHistoryColumns holds the columns for the "feature_history" table.
	FeatureHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
		{Name: "name", Type: field.TypeString},
		{Name: "display_name", Type: field.TypeString, Nullable: true},
		{Name: "enabled", Type: field.TypeBool, Default: false},
		{Name: "description", Type: field.TypeString, Nullable: true},
		{Name: "metadata", Type: field.TypeJSON, Nullable: true},
	}
	// FeatureHistoryTable holds the schema information for the "feature_history" table.
	FeatureHistoryTable = &schema.Table{
		Name:       "feature_history",
		Columns:    FeatureHistoryColumns,
		PrimaryKey: []*schema.Column{FeatureHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "featurehistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{FeatureHistoryColumns[1]},
			},
		},
	}
	// FilesColumns holds the columns for the "files" table.
	FilesColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "provided_file_name", Type: field.TypeString},
		{Name: "provided_file_extension", Type: field.TypeString},
		{Name: "provided_file_size", Type: field.TypeInt64, Nullable: true},
		{Name: "persisted_file_size", Type: field.TypeInt64, Nullable: true},
		{Name: "detected_mime_type", Type: field.TypeString, Nullable: true},
		{Name: "md5_hash", Type: field.TypeString, Nullable: true},
		{Name: "detected_content_type", Type: field.TypeString},
		{Name: "store_key", Type: field.TypeString, Nullable: true},
		{Name: "category_type", Type: field.TypeString, Nullable: true},
		{Name: "uri", Type: field.TypeString, Nullable: true},
		{Name: "storage_scheme", Type: field.TypeString, Nullable: true},
		{Name: "storage_volume", Type: field.TypeString, Nullable: true},
		{Name: "storage_path", Type: field.TypeString, Nullable: true},
		{Name: "file_contents", Type: field.TypeBytes, Nullable: true},
	}
	// FilesTable holds the schema information for the "files" table.
	FilesTable = &schema.Table{
		Name:       "files",
		Columns:    FilesColumns,
		PrimaryKey: []*schema.Column{FilesColumns[0]},
	}
	// FileHistoryColumns holds the columns for the "file_history" table.
	FileHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "provided_file_name", Type: field.TypeString},
		{Name: "provided_file_extension", Type: field.TypeString},
		{Name: "provided_file_size", Type: field.TypeInt64, Nullable: true},
		{Name: "persisted_file_size", Type: field.TypeInt64, Nullable: true},
		{Name: "detected_mime_type", Type: field.TypeString, Nullable: true},
		{Name: "md5_hash", Type: field.TypeString, Nullable: true},
		{Name: "detected_content_type", Type: field.TypeString},
		{Name: "store_key", Type: field.TypeString, Nullable: true},
		{Name: "category_type", Type: field.TypeString, Nullable: true},
		{Name: "uri", Type: field.TypeString, Nullable: true},
		{Name: "storage_scheme", Type: field.TypeString, Nullable: true},
		{Name: "storage_volume", Type: field.TypeString, Nullable: true},
		{Name: "storage_path", Type: field.TypeString, Nullable: true},
		{Name: "file_contents", Type: field.TypeBytes, Nullable: true},
	}
	// FileHistoryTable holds the schema information for the "file_history" table.
	FileHistoryTable = &schema.Table{
		Name:       "file_history",
		Columns:    FileHistoryColumns,
		PrimaryKey: []*schema.Column{FileHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "filehistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{FileHistoryColumns[1]},
			},
		},
	}
	// GroupsColumns holds the columns for the "groups" table.
	GroupsColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "name", Type: field.TypeString},
		{Name: "description", Type: field.TypeString, Nullable: true},
		{Name: "gravatar_logo_url", Type: field.TypeString, Nullable: true},
		{Name: "logo_url", Type: field.TypeString, Nullable: true},
		{Name: "display_name", Type: field.TypeString, Size: 64, Default: ""},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
	}
	// GroupsTable holds the schema information for the "groups" table.
	GroupsTable = &schema.Table{
		Name:       "groups",
		Columns:    GroupsColumns,
		PrimaryKey: []*schema.Column{GroupsColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "groups_organizations_groups",
				Columns:    []*schema.Column{GroupsColumns[14]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.SetNull,
			},
		},
		Indexes: []*schema.Index{
			{
				Name:    "group_name_owner_id",
				Unique:  true,
				Columns: []*schema.Column{GroupsColumns[9], GroupsColumns[14]},
				Annotation: &entsql.IndexAnnotation{
					Where: "deleted_at is NULL",
				},
			},
		},
	}
	// GroupHistoryColumns holds the columns for the "group_history" table.
	GroupHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
		{Name: "name", Type: field.TypeString},
		{Name: "description", Type: field.TypeString, Nullable: true},
		{Name: "gravatar_logo_url", Type: field.TypeString, Nullable: true},
		{Name: "logo_url", Type: field.TypeString, Nullable: true},
		{Name: "display_name", Type: field.TypeString, Size: 64, Default: ""},
	}
	// GroupHistoryTable holds the schema information for the "group_history" table.
	GroupHistoryTable = &schema.Table{
		Name:       "group_history",
		Columns:    GroupHistoryColumns,
		PrimaryKey: []*schema.Column{GroupHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "grouphistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{GroupHistoryColumns[1]},
			},
		},
	}
	// GroupMembershipsColumns holds the columns for the "group_memberships" table.
	GroupMembershipsColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "role", Type: field.TypeEnum, Enums: []string{"ADMIN", "MEMBER", "USER"}, Default: "MEMBER"},
		{Name: "group_id", Type: field.TypeString},
		{Name: "user_id", Type: field.TypeString},
	}
	// GroupMembershipsTable holds the schema information for the "group_memberships" table.
	GroupMembershipsTable = &schema.Table{
		Name:       "group_memberships",
		Columns:    GroupMembershipsColumns,
		PrimaryKey: []*schema.Column{GroupMembershipsColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "group_memberships_groups_group",
				Columns:    []*schema.Column{GroupMembershipsColumns[9]},
				RefColumns: []*schema.Column{GroupsColumns[0]},
				OnDelete:   schema.NoAction,
			},
			{
				Symbol:     "group_memberships_users_user",
				Columns:    []*schema.Column{GroupMembershipsColumns[10]},
				RefColumns: []*schema.Column{UsersColumns[0]},
				OnDelete:   schema.NoAction,
			},
		},
		Indexes: []*schema.Index{
			{
				Name:    "groupmembership_user_id_group_id",
				Unique:  true,
				Columns: []*schema.Column{GroupMembershipsColumns[10], GroupMembershipsColumns[9]},
				Annotation: &entsql.IndexAnnotation{
					Where: "deleted_at is NULL",
				},
			},
		},
	}
	// GroupMembershipHistoryColumns holds the columns for the "group_membership_history" table.
	GroupMembershipHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "role", Type: field.TypeEnum, Enums: []string{"ADMIN", "MEMBER", "USER"}, Default: "MEMBER"},
		{Name: "group_id", Type: field.TypeString},
		{Name: "user_id", Type: field.TypeString},
	}
	// GroupMembershipHistoryTable holds the schema information for the "group_membership_history" table.
	GroupMembershipHistoryTable = &schema.Table{
		Name:       "group_membership_history",
		Columns:    GroupMembershipHistoryColumns,
		PrimaryKey: []*schema.Column{GroupMembershipHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "groupmembershiphistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{GroupMembershipHistoryColumns[1]},
			},
		},
	}
	// GroupSettingsColumns holds the columns for the "group_settings" table.
	GroupSettingsColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "visibility", Type: field.TypeEnum, Enums: []string{"PUBLIC", "PRIVATE"}, Default: "PUBLIC"},
		{Name: "join_policy", Type: field.TypeEnum, Enums: []string{"OPEN", "INVITE_ONLY", "APPLICATION_ONLY", "INVITE_OR_APPLICATION"}, Default: "INVITE_OR_APPLICATION"},
		{Name: "sync_to_slack", Type: field.TypeBool, Nullable: true, Default: false},
		{Name: "sync_to_github", Type: field.TypeBool, Nullable: true, Default: false},
		{Name: "group_id", Type: field.TypeString, Unique: true, Nullable: true},
	}
	// GroupSettingsTable holds the schema information for the "group_settings" table.
	GroupSettingsTable = &schema.Table{
		Name:       "group_settings",
		Columns:    GroupSettingsColumns,
		PrimaryKey: []*schema.Column{GroupSettingsColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "group_settings_groups_setting",
				Columns:    []*schema.Column{GroupSettingsColumns[13]},
				RefColumns: []*schema.Column{GroupsColumns[0]},
				OnDelete:   schema.SetNull,
			},
		},
	}
	// GroupSettingHistoryColumns holds the columns for the "group_setting_history" table.
	GroupSettingHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "visibility", Type: field.TypeEnum, Enums: []string{"PUBLIC", "PRIVATE"}, Default: "PUBLIC"},
		{Name: "join_policy", Type: field.TypeEnum, Enums: []string{"OPEN", "INVITE_ONLY", "APPLICATION_ONLY", "INVITE_OR_APPLICATION"}, Default: "INVITE_OR_APPLICATION"},
		{Name: "sync_to_slack", Type: field.TypeBool, Nullable: true, Default: false},
		{Name: "sync_to_github", Type: field.TypeBool, Nullable: true, Default: false},
		{Name: "group_id", Type: field.TypeString, Nullable: true},
	}
	// GroupSettingHistoryTable holds the schema information for the "group_setting_history" table.
	GroupSettingHistoryTable = &schema.Table{
		Name:       "group_setting_history",
		Columns:    GroupSettingHistoryColumns,
		PrimaryKey: []*schema.Column{GroupSettingHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "groupsettinghistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{GroupSettingHistoryColumns[1]},
			},
		},
	}
	// HushesColumns holds the columns for the "hushes" table.
	HushesColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "name", Type: field.TypeString},
		{Name: "description", Type: field.TypeString, Nullable: true},
		{Name: "kind", Type: field.TypeString, Nullable: true},
		{Name: "secret_name", Type: field.TypeString, Nullable: true},
		{Name: "secret_value", Type: field.TypeString, Nullable: true},
	}
	// HushesTable holds the schema information for the "hushes" table.
	HushesTable = &schema.Table{
		Name:       "hushes",
		Columns:    HushesColumns,
		PrimaryKey: []*schema.Column{HushesColumns[0]},
	}
	// HushHistoryColumns holds the columns for the "hush_history" table.
	HushHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "name", Type: field.TypeString},
		{Name: "description", Type: field.TypeString, Nullable: true},
		{Name: "kind", Type: field.TypeString, Nullable: true},
		{Name: "secret_name", Type: field.TypeString, Nullable: true},
		{Name: "secret_value", Type: field.TypeString, Nullable: true},
	}
	// HushHistoryTable holds the schema information for the "hush_history" table.
	HushHistoryTable = &schema.Table{
		Name:       "hush_history",
		Columns:    HushHistoryColumns,
		PrimaryKey: []*schema.Column{HushHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "hushhistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{HushHistoryColumns[1]},
			},
		},
	}
	// IntegrationsColumns holds the columns for the "integrations" table.
	IntegrationsColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "name", Type: field.TypeString},
		{Name: "description", Type: field.TypeString, Nullable: true},
		{Name: "kind", Type: field.TypeString, Nullable: true},
		{Name: "group_integrations", Type: field.TypeString, Nullable: true},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
	}
	// IntegrationsTable holds the schema information for the "integrations" table.
	IntegrationsTable = &schema.Table{
		Name:       "integrations",
		Columns:    IntegrationsColumns,
		PrimaryKey: []*schema.Column{IntegrationsColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "integrations_groups_integrations",
				Columns:    []*schema.Column{IntegrationsColumns[12]},
				RefColumns: []*schema.Column{GroupsColumns[0]},
				OnDelete:   schema.SetNull,
			},
			{
				Symbol:     "integrations_organizations_integrations",
				Columns:    []*schema.Column{IntegrationsColumns[13]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.SetNull,
			},
		},
	}
	// IntegrationHistoryColumns holds the columns for the "integration_history" table.
	IntegrationHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
		{Name: "name", Type: field.TypeString},
		{Name: "description", Type: field.TypeString, Nullable: true},
		{Name: "kind", Type: field.TypeString, Nullable: true},
	}
	// IntegrationHistoryTable holds the schema information for the "integration_history" table.
	IntegrationHistoryTable = &schema.Table{
		Name:       "integration_history",
		Columns:    IntegrationHistoryColumns,
		PrimaryKey: []*schema.Column{IntegrationHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "integrationhistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{IntegrationHistoryColumns[1]},
			},
		},
	}
	// InvitesColumns holds the columns for the "invites" table.
	InvitesColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "token", Type: field.TypeString, Unique: true},
		{Name: "expires", Type: field.TypeTime, Nullable: true},
		{Name: "recipient", Type: field.TypeString},
		{Name: "status", Type: field.TypeEnum, Enums: []string{"INVITATION_SENT", "APPROVAL_REQUIRED", "INVITATION_ACCEPTED", "INVITATION_EXPIRED"}, Default: "INVITATION_SENT"},
		{Name: "role", Type: field.TypeEnum, Enums: []string{"ADMIN", "MEMBER", "USER"}, Default: "MEMBER"},
		{Name: "send_attempts", Type: field.TypeInt, Default: 0},
		{Name: "requestor_id", Type: field.TypeString, Nullable: true},
		{Name: "secret", Type: field.TypeBytes},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
	}
	// InvitesTable holds the schema information for the "invites" table.
	InvitesTable = &schema.Table{
		Name:       "invites",
		Columns:    InvitesColumns,
		PrimaryKey: []*schema.Column{InvitesColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "invites_organizations_invites",
				Columns:    []*schema.Column{InvitesColumns[16]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.SetNull,
			},
		},
		Indexes: []*schema.Index{
			{
				Name:    "invite_recipient_owner_id",
				Unique:  true,
				Columns: []*schema.Column{InvitesColumns[10], InvitesColumns[16]},
				Annotation: &entsql.IndexAnnotation{
					Where: "deleted_at is NULL",
				},
			},
		},
	}
	// NotesColumns holds the columns for the "notes" table.
	NotesColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "text", Type: field.TypeString},
		{Name: "entity_notes", Type: field.TypeString, Nullable: true},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
	}
	// NotesTable holds the schema information for the "notes" table.
	NotesTable = &schema.Table{
		Name:       "notes",
		Columns:    NotesColumns,
		PrimaryKey: []*schema.Column{NotesColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "notes_entities_notes",
				Columns:    []*schema.Column{NotesColumns[10]},
				RefColumns: []*schema.Column{EntitiesColumns[0]},
				OnDelete:   schema.SetNull,
			},
			{
				Symbol:     "notes_organizations_notes",
				Columns:    []*schema.Column{NotesColumns[11]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.SetNull,
			},
		},
	}
	// NoteHistoryColumns holds the columns for the "note_history" table.
	NoteHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
		{Name: "text", Type: field.TypeString},
	}
	// NoteHistoryTable holds the schema information for the "note_history" table.
	NoteHistoryTable = &schema.Table{
		Name:       "note_history",
		Columns:    NoteHistoryColumns,
		PrimaryKey: []*schema.Column{NoteHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "notehistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{NoteHistoryColumns[1]},
			},
		},
	}
	// OauthProvidersColumns holds the columns for the "oauth_providers" table.
	OauthProvidersColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "name", Type: field.TypeString},
		{Name: "client_id", Type: field.TypeString},
		{Name: "client_secret", Type: field.TypeString},
		{Name: "redirect_url", Type: field.TypeString},
		{Name: "scopes", Type: field.TypeString},
		{Name: "auth_url", Type: field.TypeString},
		{Name: "token_url", Type: field.TypeString},
		{Name: "auth_style", Type: field.TypeUint8},
		{Name: "info_url", Type: field.TypeString},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
	}
	// OauthProvidersTable holds the schema information for the "oauth_providers" table.
	OauthProvidersTable = &schema.Table{
		Name:       "oauth_providers",
		Columns:    OauthProvidersColumns,
		PrimaryKey: []*schema.Column{OauthProvidersColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "oauth_providers_organizations_oauthprovider",
				Columns:    []*schema.Column{OauthProvidersColumns[18]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.SetNull,
			},
		},
	}
	// OauthProviderHistoryColumns holds the columns for the "oauth_provider_history" table.
	OauthProviderHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
		{Name: "name", Type: field.TypeString},
		{Name: "client_id", Type: field.TypeString},
		{Name: "client_secret", Type: field.TypeString},
		{Name: "redirect_url", Type: field.TypeString},
		{Name: "scopes", Type: field.TypeString},
		{Name: "auth_url", Type: field.TypeString},
		{Name: "token_url", Type: field.TypeString},
		{Name: "auth_style", Type: field.TypeUint8},
		{Name: "info_url", Type: field.TypeString},
	}
	// OauthProviderHistoryTable holds the schema information for the "oauth_provider_history" table.
	OauthProviderHistoryTable = &schema.Table{
		Name:       "oauth_provider_history",
		Columns:    OauthProviderHistoryColumns,
		PrimaryKey: []*schema.Column{OauthProviderHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "oauthproviderhistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{OauthProviderHistoryColumns[1]},
			},
		},
	}
	// OhAuthTooTokensColumns holds the columns for the "oh_auth_too_tokens" table.
	OhAuthTooTokensColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "client_id", Type: field.TypeString, Size: 2147483647},
		{Name: "scopes", Type: field.TypeJSON, Nullable: true},
		{Name: "nonce", Type: field.TypeString, Size: 2147483647},
		{Name: "claims_user_id", Type: field.TypeString, Size: 2147483647},
		{Name: "claims_username", Type: field.TypeString, Size: 2147483647},
		{Name: "claims_email", Type: field.TypeString, Size: 2147483647},
		{Name: "claims_email_verified", Type: field.TypeBool},
		{Name: "claims_groups", Type: field.TypeJSON, Nullable: true},
		{Name: "claims_preferred_username", Type: field.TypeString, Size: 2147483647},
		{Name: "connector_id", Type: field.TypeString, Size: 2147483647},
		{Name: "connector_data", Type: field.TypeJSON, Nullable: true},
		{Name: "last_used", Type: field.TypeTime},
	}
	// OhAuthTooTokensTable holds the schema information for the "oh_auth_too_tokens" table.
	OhAuthTooTokensTable = &schema.Table{
		Name:       "oh_auth_too_tokens",
		Columns:    OhAuthTooTokensColumns,
		PrimaryKey: []*schema.Column{OhAuthTooTokensColumns[0]},
	}
	// OrgMembershipsColumns holds the columns for the "org_memberships" table.
	OrgMembershipsColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "role", Type: field.TypeEnum, Enums: []string{"ADMIN", "MEMBER", "USER", "OWNER"}, Default: "MEMBER"},
		{Name: "organization_id", Type: field.TypeString},
		{Name: "user_id", Type: field.TypeString},
	}
	// OrgMembershipsTable holds the schema information for the "org_memberships" table.
	OrgMembershipsTable = &schema.Table{
		Name:       "org_memberships",
		Columns:    OrgMembershipsColumns,
		PrimaryKey: []*schema.Column{OrgMembershipsColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "org_memberships_organizations_organization",
				Columns:    []*schema.Column{OrgMembershipsColumns[9]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.NoAction,
			},
			{
				Symbol:     "org_memberships_users_user",
				Columns:    []*schema.Column{OrgMembershipsColumns[10]},
				RefColumns: []*schema.Column{UsersColumns[0]},
				OnDelete:   schema.NoAction,
			},
		},
		Indexes: []*schema.Index{
			{
				Name:    "orgmembership_user_id_organization_id",
				Unique:  true,
				Columns: []*schema.Column{OrgMembershipsColumns[10], OrgMembershipsColumns[9]},
				Annotation: &entsql.IndexAnnotation{
					Where: "deleted_at is NULL",
				},
			},
		},
	}
	// OrgMembershipHistoryColumns holds the columns for the "org_membership_history" table.
	OrgMembershipHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "role", Type: field.TypeEnum, Enums: []string{"ADMIN", "MEMBER", "USER", "OWNER"}, Default: "MEMBER"},
		{Name: "organization_id", Type: field.TypeString},
		{Name: "user_id", Type: field.TypeString},
	}
	// OrgMembershipHistoryTable holds the schema information for the "org_membership_history" table.
	OrgMembershipHistoryTable = &schema.Table{
		Name:       "org_membership_history",
		Columns:    OrgMembershipHistoryColumns,
		PrimaryKey: []*schema.Column{OrgMembershipHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "orgmembershiphistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{OrgMembershipHistoryColumns[1]},
			},
		},
	}
	// OrganizationsColumns holds the columns for the "organizations" table.
	OrganizationsColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "name", Type: field.TypeString, Size: 160},
		{Name: "display_name", Type: field.TypeString, Size: 64, Default: ""},
		{Name: "description", Type: field.TypeString, Nullable: true},
		{Name: "personal_org", Type: field.TypeBool, Nullable: true, Default: false},
		{Name: "avatar_remote_url", Type: field.TypeString, Nullable: true, Size: 2048},
		{Name: "dedicated_db", Type: field.TypeBool, Default: false},
		{Name: "parent_organization_id", Type: field.TypeString, Nullable: true},
	}
	// OrganizationsTable holds the schema information for the "organizations" table.
	OrganizationsTable = &schema.Table{
		Name:       "organizations",
		Columns:    OrganizationsColumns,
		PrimaryKey: []*schema.Column{OrganizationsColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "organizations_organizations_children",
				Columns:    []*schema.Column{OrganizationsColumns[15]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.SetNull,
			},
		},
		Indexes: []*schema.Index{
			{
				Name:    "organization_name",
				Unique:  true,
				Columns: []*schema.Column{OrganizationsColumns[9]},
				Annotation: &entsql.IndexAnnotation{
					Where: "deleted_at is NULL",
				},
			},
		},
	}
	// OrganizationHistoryColumns holds the columns for the "organization_history" table.
	OrganizationHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "name", Type: field.TypeString, Size: 160},
		{Name: "display_name", Type: field.TypeString, Size: 64, Default: ""},
		{Name: "description", Type: field.TypeString, Nullable: true},
		{Name: "parent_organization_id", Type: field.TypeString, Nullable: true},
		{Name: "personal_org", Type: field.TypeBool, Nullable: true, Default: false},
		{Name: "avatar_remote_url", Type: field.TypeString, Nullable: true, Size: 2048},
		{Name: "dedicated_db", Type: field.TypeBool, Default: false},
	}
	// OrganizationHistoryTable holds the schema information for the "organization_history" table.
	OrganizationHistoryTable = &schema.Table{
		Name:       "organization_history",
		Columns:    OrganizationHistoryColumns,
		PrimaryKey: []*schema.Column{OrganizationHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "organizationhistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{OrganizationHistoryColumns[1]},
			},
		},
	}
	// OrganizationSettingsColumns holds the columns for the "organization_settings" table.
	OrganizationSettingsColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "domains", Type: field.TypeJSON, Nullable: true},
		{Name: "billing_contact", Type: field.TypeString, Nullable: true},
		{Name: "billing_email", Type: field.TypeString, Nullable: true},
		{Name: "billing_phone", Type: field.TypeString, Nullable: true},
		{Name: "billing_address", Type: field.TypeString, Nullable: true},
		{Name: "tax_identifier", Type: field.TypeString, Nullable: true},
		{Name: "geo_location", Type: field.TypeEnum, Nullable: true, Enums: []string{"AMER", "EMEA", "APAC"}, Default: "AMER"},
		{Name: "organization_id", Type: field.TypeString, Unique: true, Nullable: true},
	}
	// OrganizationSettingsTable holds the schema information for the "organization_settings" table.
	OrganizationSettingsTable = &schema.Table{
		Name:       "organization_settings",
		Columns:    OrganizationSettingsColumns,
		PrimaryKey: []*schema.Column{OrganizationSettingsColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "organization_settings_organizations_setting",
				Columns:    []*schema.Column{OrganizationSettingsColumns[16]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.SetNull,
			},
		},
	}
	// OrganizationSettingHistoryColumns holds the columns for the "organization_setting_history" table.
	OrganizationSettingHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "domains", Type: field.TypeJSON, Nullable: true},
		{Name: "billing_contact", Type: field.TypeString, Nullable: true},
		{Name: "billing_email", Type: field.TypeString, Nullable: true},
		{Name: "billing_phone", Type: field.TypeString, Nullable: true},
		{Name: "billing_address", Type: field.TypeString, Nullable: true},
		{Name: "tax_identifier", Type: field.TypeString, Nullable: true},
		{Name: "geo_location", Type: field.TypeEnum, Nullable: true, Enums: []string{"AMER", "EMEA", "APAC"}, Default: "AMER"},
		{Name: "organization_id", Type: field.TypeString, Nullable: true},
	}
	// OrganizationSettingHistoryTable holds the schema information for the "organization_setting_history" table.
	OrganizationSettingHistoryTable = &schema.Table{
		Name:       "organization_setting_history",
		Columns:    OrganizationSettingHistoryColumns,
		PrimaryKey: []*schema.Column{OrganizationSettingHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "organizationsettinghistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{OrganizationSettingHistoryColumns[1]},
			},
		},
	}
	// PasswordResetTokensColumns holds the columns for the "password_reset_tokens" table.
	PasswordResetTokensColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "token", Type: field.TypeString, Unique: true},
		{Name: "ttl", Type: field.TypeTime},
		{Name: "email", Type: field.TypeString},
		{Name: "secret", Type: field.TypeBytes},
		{Name: "owner_id", Type: field.TypeString},
	}
	// PasswordResetTokensTable holds the schema information for the "password_reset_tokens" table.
	PasswordResetTokensTable = &schema.Table{
		Name:       "password_reset_tokens",
		Columns:    PasswordResetTokensColumns,
		PrimaryKey: []*schema.Column{PasswordResetTokensColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "password_reset_tokens_users_password_reset_tokens",
				Columns:    []*schema.Column{PasswordResetTokensColumns[12]},
				RefColumns: []*schema.Column{UsersColumns[0]},
				OnDelete:   schema.NoAction,
			},
		},
		Indexes: []*schema.Index{
			{
				Name:    "passwordresettoken_token",
				Unique:  true,
				Columns: []*schema.Column{PasswordResetTokensColumns[8]},
				Annotation: &entsql.IndexAnnotation{
					Where: "deleted_at is NULL",
				},
			},
		},
	}
	// PersonalAccessTokensColumns holds the columns for the "personal_access_tokens" table.
	PersonalAccessTokensColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "name", Type: field.TypeString},
		{Name: "token", Type: field.TypeString, Unique: true},
		{Name: "expires_at", Type: field.TypeTime, Nullable: true},
		{Name: "description", Type: field.TypeString, Nullable: true},
		{Name: "scopes", Type: field.TypeJSON, Nullable: true},
		{Name: "last_used_at", Type: field.TypeTime, Nullable: true},
		{Name: "owner_id", Type: field.TypeString},
	}
	// PersonalAccessTokensTable holds the schema information for the "personal_access_tokens" table.
	PersonalAccessTokensTable = &schema.Table{
		Name:       "personal_access_tokens",
		Columns:    PersonalAccessTokensColumns,
		PrimaryKey: []*schema.Column{PersonalAccessTokensColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "personal_access_tokens_users_personal_access_tokens",
				Columns:    []*schema.Column{PersonalAccessTokensColumns[15]},
				RefColumns: []*schema.Column{UsersColumns[0]},
				OnDelete:   schema.NoAction,
			},
		},
		Indexes: []*schema.Index{
			{
				Name:    "personalaccesstoken_token",
				Unique:  false,
				Columns: []*schema.Column{PersonalAccessTokensColumns[10]},
			},
		},
	}
	// SubscribersColumns holds the columns for the "subscribers" table.
	SubscribersColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "email", Type: field.TypeString},
		{Name: "phone_number", Type: field.TypeString, Nullable: true},
		{Name: "verified_email", Type: field.TypeBool, Default: false},
		{Name: "verified_phone", Type: field.TypeBool, Default: false},
		{Name: "active", Type: field.TypeBool, Default: false},
		{Name: "token", Type: field.TypeString, Unique: true},
		{Name: "ttl", Type: field.TypeTime},
		{Name: "secret", Type: field.TypeBytes},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
	}
	// SubscribersTable holds the schema information for the "subscribers" table.
	SubscribersTable = &schema.Table{
		Name:       "subscribers",
		Columns:    SubscribersColumns,
		PrimaryKey: []*schema.Column{SubscribersColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "subscribers_organizations_subscribers",
				Columns:    []*schema.Column{SubscribersColumns[17]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.SetNull,
			},
		},
		Indexes: []*schema.Index{
			{
				Name:    "subscriber_email_owner_id",
				Unique:  true,
				Columns: []*schema.Column{SubscribersColumns[9], SubscribersColumns[17]},
				Annotation: &entsql.IndexAnnotation{
					Where: "deleted_at is NULL",
				},
			},
		},
	}
	// TfaSettingsColumns holds the columns for the "tfa_settings" table.
	TfaSettingsColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "tfa_secret", Type: field.TypeString, Nullable: true},
		{Name: "verified", Type: field.TypeBool, Default: false},
		{Name: "recovery_codes", Type: field.TypeJSON, Nullable: true},
		{Name: "phone_otp_allowed", Type: field.TypeBool, Nullable: true, Default: false},
		{Name: "email_otp_allowed", Type: field.TypeBool, Nullable: true, Default: false},
		{Name: "totp_allowed", Type: field.TypeBool, Nullable: true, Default: false},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
	}
	// TfaSettingsTable holds the schema information for the "tfa_settings" table.
	TfaSettingsTable = &schema.Table{
		Name:       "tfa_settings",
		Columns:    TfaSettingsColumns,
		PrimaryKey: []*schema.Column{TfaSettingsColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "tfa_settings_users_tfa_settings",
				Columns:    []*schema.Column{TfaSettingsColumns[15]},
				RefColumns: []*schema.Column{UsersColumns[0]},
				OnDelete:   schema.SetNull,
			},
		},
		Indexes: []*schema.Index{
			{
				Name:    "tfasetting_owner_id",
				Unique:  true,
				Columns: []*schema.Column{TfaSettingsColumns[15]},
				Annotation: &entsql.IndexAnnotation{
					Where: "deleted_at is NULL",
				},
			},
		},
	}
	// TemplatesColumns holds the columns for the "templates" table.
	TemplatesColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "name", Type: field.TypeString},
		{Name: "template_type", Type: field.TypeEnum, Enums: []string{"ROOTTEMPLATE", "DOCUMENT"}, Default: "DOCUMENT"},
		{Name: "description", Type: field.TypeString, Nullable: true},
		{Name: "jsonconfig", Type: field.TypeJSON},
		{Name: "uischema", Type: field.TypeJSON, Nullable: true},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
	}
	// TemplatesTable holds the schema information for the "templates" table.
	TemplatesTable = &schema.Table{
		Name:       "templates",
		Columns:    TemplatesColumns,
		PrimaryKey: []*schema.Column{TemplatesColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "templates_organizations_templates",
				Columns:    []*schema.Column{TemplatesColumns[14]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.SetNull,
			},
		},
		Indexes: []*schema.Index{
			{
				Name:    "template_name_owner_id_template_type",
				Unique:  true,
				Columns: []*schema.Column{TemplatesColumns[9], TemplatesColumns[14], TemplatesColumns[10]},
				Annotation: &entsql.IndexAnnotation{
					Where: "deleted_at is NULL",
				},
			},
		},
	}
	// TemplateHistoryColumns holds the columns for the "template_history" table.
	TemplateHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
		{Name: "name", Type: field.TypeString},
		{Name: "template_type", Type: field.TypeEnum, Enums: []string{"ROOTTEMPLATE", "DOCUMENT"}, Default: "DOCUMENT"},
		{Name: "description", Type: field.TypeString, Nullable: true},
		{Name: "jsonconfig", Type: field.TypeJSON},
		{Name: "uischema", Type: field.TypeJSON, Nullable: true},
	}
	// TemplateHistoryTable holds the schema information for the "template_history" table.
	TemplateHistoryTable = &schema.Table{
		Name:       "template_history",
		Columns:    TemplateHistoryColumns,
		PrimaryKey: []*schema.Column{TemplateHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "templatehistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{TemplateHistoryColumns[1]},
			},
		},
	}
	// UsersColumns holds the columns for the "users" table.
	UsersColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "email", Type: field.TypeString},
		{Name: "first_name", Type: field.TypeString, Nullable: true, Size: 64},
		{Name: "last_name", Type: field.TypeString, Nullable: true, Size: 64},
		{Name: "display_name", Type: field.TypeString, Size: 64},
		{Name: "avatar_remote_url", Type: field.TypeString, Nullable: true, Size: 2048},
		{Name: "avatar_local_file", Type: field.TypeString, Nullable: true, Size: 2048},
		{Name: "avatar_updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "last_seen", Type: field.TypeTime, Nullable: true},
		{Name: "password", Type: field.TypeString, Nullable: true},
		{Name: "sub", Type: field.TypeString, Unique: true, Nullable: true},
		{Name: "auth_provider", Type: field.TypeEnum, Enums: []string{"CREDENTIALS", "GOOGLE", "GITHUB", "WEBAUTHN"}, Default: "CREDENTIALS"},
		{Name: "role", Type: field.TypeEnum, Nullable: true, Enums: []string{"ADMIN", "MEMBER", "USER"}, Default: "USER"},
		{Name: "avatar_local_file_id", Type: field.TypeString, Nullable: true},
	}
	// UsersTable holds the schema information for the "users" table.
	UsersTable = &schema.Table{
		Name:       "users",
		Columns:    UsersColumns,
		PrimaryKey: []*schema.Column{UsersColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "users_files_file",
				Columns:    []*schema.Column{UsersColumns[21]},
				RefColumns: []*schema.Column{FilesColumns[0]},
				OnDelete:   schema.SetNull,
			},
		},
		Indexes: []*schema.Index{
			{
				Name:    "user_id",
				Unique:  true,
				Columns: []*schema.Column{UsersColumns[0]},
			},
			{
				Name:    "user_email_auth_provider",
				Unique:  true,
				Columns: []*schema.Column{UsersColumns[9], UsersColumns[19]},
				Annotation: &entsql.IndexAnnotation{
					Where: "deleted_at is NULL",
				},
			},
		},
	}
	// UserHistoryColumns holds the columns for the "user_history" table.
	UserHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "email", Type: field.TypeString},
		{Name: "first_name", Type: field.TypeString, Nullable: true, Size: 64},
		{Name: "last_name", Type: field.TypeString, Nullable: true, Size: 64},
		{Name: "display_name", Type: field.TypeString, Size: 64},
		{Name: "avatar_remote_url", Type: field.TypeString, Nullable: true, Size: 2048},
		{Name: "avatar_local_file", Type: field.TypeString, Nullable: true, Size: 2048},
		{Name: "avatar_local_file_id", Type: field.TypeString, Nullable: true},
		{Name: "avatar_updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "last_seen", Type: field.TypeTime, Nullable: true},
		{Name: "password", Type: field.TypeString, Nullable: true},
		{Name: "sub", Type: field.TypeString, Nullable: true},
		{Name: "auth_provider", Type: field.TypeEnum, Enums: []string{"CREDENTIALS", "GOOGLE", "GITHUB", "WEBAUTHN"}, Default: "CREDENTIALS"},
		{Name: "role", Type: field.TypeEnum, Nullable: true, Enums: []string{"ADMIN", "MEMBER", "USER"}, Default: "USER"},
	}
	// UserHistoryTable holds the schema information for the "user_history" table.
	UserHistoryTable = &schema.Table{
		Name:       "user_history",
		Columns:    UserHistoryColumns,
		PrimaryKey: []*schema.Column{UserHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "userhistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{UserHistoryColumns[1]},
			},
		},
	}
	// UserSettingsColumns holds the columns for the "user_settings" table.
	UserSettingsColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "locked", Type: field.TypeBool, Default: false},
		{Name: "silenced_at", Type: field.TypeTime, Nullable: true},
		{Name: "suspended_at", Type: field.TypeTime, Nullable: true},
		{Name: "status", Type: field.TypeEnum, Enums: []string{"ACTIVE", "INACTIVE", "DEACTIVATED", "SUSPENDED", "ONBOARDING"}, Default: "ACTIVE"},
		{Name: "email_confirmed", Type: field.TypeBool, Default: false},
		{Name: "is_webauthn_allowed", Type: field.TypeBool, Nullable: true, Default: false},
		{Name: "is_tfa_enabled", Type: field.TypeBool, Nullable: true, Default: false},
		{Name: "phone_number", Type: field.TypeString, Nullable: true},
		{Name: "user_id", Type: field.TypeString, Unique: true, Nullable: true},
		{Name: "user_setting_default_org", Type: field.TypeString, Nullable: true},
	}
	// UserSettingsTable holds the schema information for the "user_settings" table.
	UserSettingsTable = &schema.Table{
		Name:       "user_settings",
		Columns:    UserSettingsColumns,
		PrimaryKey: []*schema.Column{UserSettingsColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "user_settings_users_setting",
				Columns:    []*schema.Column{UserSettingsColumns[17]},
				RefColumns: []*schema.Column{UsersColumns[0]},
				OnDelete:   schema.SetNull,
			},
			{
				Symbol:     "user_settings_organizations_default_org",
				Columns:    []*schema.Column{UserSettingsColumns[18]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.SetNull,
			},
		},
	}
	// UserSettingHistoryColumns holds the columns for the "user_setting_history" table.
	UserSettingHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "user_id", Type: field.TypeString, Nullable: true},
		{Name: "locked", Type: field.TypeBool, Default: false},
		{Name: "silenced_at", Type: field.TypeTime, Nullable: true},
		{Name: "suspended_at", Type: field.TypeTime, Nullable: true},
		{Name: "status", Type: field.TypeEnum, Enums: []string{"ACTIVE", "INACTIVE", "DEACTIVATED", "SUSPENDED", "ONBOARDING"}, Default: "ACTIVE"},
		{Name: "email_confirmed", Type: field.TypeBool, Default: false},
		{Name: "is_webauthn_allowed", Type: field.TypeBool, Nullable: true, Default: false},
		{Name: "is_tfa_enabled", Type: field.TypeBool, Nullable: true, Default: false},
		{Name: "phone_number", Type: field.TypeString, Nullable: true},
	}
	// UserSettingHistoryTable holds the schema information for the "user_setting_history" table.
	UserSettingHistoryTable = &schema.Table{
		Name:       "user_setting_history",
		Columns:    UserSettingHistoryColumns,
		PrimaryKey: []*schema.Column{UserSettingHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "usersettinghistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{UserSettingHistoryColumns[1]},
			},
		},
	}
	// WebauthnsColumns holds the columns for the "webauthns" table.
	WebauthnsColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "credential_id", Type: field.TypeBytes, Unique: true, Nullable: true},
		{Name: "public_key", Type: field.TypeBytes, Nullable: true},
		{Name: "attestation_type", Type: field.TypeString, Nullable: true},
		{Name: "aaguid", Type: field.TypeBytes, Unique: true},
		{Name: "sign_count", Type: field.TypeInt32},
		{Name: "transports", Type: field.TypeJSON},
		{Name: "backup_eligible", Type: field.TypeBool, Default: false},
		{Name: "backup_state", Type: field.TypeBool, Default: false},
		{Name: "user_present", Type: field.TypeBool, Default: false},
		{Name: "user_verified", Type: field.TypeBool, Default: false},
		{Name: "owner_id", Type: field.TypeString},
	}
	// WebauthnsTable holds the schema information for the "webauthns" table.
	WebauthnsTable = &schema.Table{
		Name:       "webauthns",
		Columns:    WebauthnsColumns,
		PrimaryKey: []*schema.Column{WebauthnsColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "webauthns_users_webauthn",
				Columns:    []*schema.Column{WebauthnsColumns[17]},
				RefColumns: []*schema.Column{UsersColumns[0]},
				OnDelete:   schema.NoAction,
			},
		},
	}
	// WebhooksColumns holds the columns for the "webhooks" table.
	WebhooksColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString, Unique: true},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "name", Type: field.TypeString},
		{Name: "description", Type: field.TypeString, Nullable: true},
		{Name: "destination_url", Type: field.TypeString},
		{Name: "enabled", Type: field.TypeBool, Default: true},
		{Name: "callback", Type: field.TypeString, Unique: true, Nullable: true},
		{Name: "expires_at", Type: field.TypeTime, Nullable: true},
		{Name: "secret", Type: field.TypeBytes, Nullable: true},
		{Name: "failures", Type: field.TypeInt, Nullable: true, Default: 0},
		{Name: "last_error", Type: field.TypeString, Nullable: true},
		{Name: "last_response", Type: field.TypeString, Nullable: true},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
	}
	// WebhooksTable holds the schema information for the "webhooks" table.
	WebhooksTable = &schema.Table{
		Name:       "webhooks",
		Columns:    WebhooksColumns,
		PrimaryKey: []*schema.Column{WebhooksColumns[0]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "webhooks_organizations_webhooks",
				Columns:    []*schema.Column{WebhooksColumns[19]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.SetNull,
			},
		},
		Indexes: []*schema.Index{
			{
				Name:    "webhook_name_owner_id",
				Unique:  true,
				Columns: []*schema.Column{WebhooksColumns[9], WebhooksColumns[19]},
				Annotation: &entsql.IndexAnnotation{
					Where: "deleted_at is NULL",
				},
			},
		},
	}
	// WebhookHistoryColumns holds the columns for the "webhook_history" table.
	WebhookHistoryColumns = []*schema.Column{
		{Name: "id", Type: field.TypeString},
		{Name: "history_time", Type: field.TypeTime},
		{Name: "ref", Type: field.TypeString, Nullable: true},
		{Name: "operation", Type: field.TypeEnum, Enums: []string{"INSERT", "UPDATE", "DELETE"}},
		{Name: "created_at", Type: field.TypeTime, Nullable: true},
		{Name: "updated_at", Type: field.TypeTime, Nullable: true},
		{Name: "created_by", Type: field.TypeString, Nullable: true},
		{Name: "updated_by", Type: field.TypeString, Nullable: true},
		{Name: "mapping_id", Type: field.TypeString},
		{Name: "tags", Type: field.TypeJSON, Nullable: true},
		{Name: "deleted_at", Type: field.TypeTime, Nullable: true},
		{Name: "deleted_by", Type: field.TypeString, Nullable: true},
		{Name: "owner_id", Type: field.TypeString, Nullable: true},
		{Name: "name", Type: field.TypeString},
		{Name: "description", Type: field.TypeString, Nullable: true},
		{Name: "destination_url", Type: field.TypeString},
		{Name: "enabled", Type: field.TypeBool, Default: true},
		{Name: "callback", Type: field.TypeString, Nullable: true},
		{Name: "expires_at", Type: field.TypeTime, Nullable: true},
		{Name: "secret", Type: field.TypeBytes, Nullable: true},
		{Name: "failures", Type: field.TypeInt, Nullable: true, Default: 0},
		{Name: "last_error", Type: field.TypeString, Nullable: true},
		{Name: "last_response", Type: field.TypeString, Nullable: true},
	}
	// WebhookHistoryTable holds the schema information for the "webhook_history" table.
	WebhookHistoryTable = &schema.Table{
		Name:       "webhook_history",
		Columns:    WebhookHistoryColumns,
		PrimaryKey: []*schema.Column{WebhookHistoryColumns[0]},
		Indexes: []*schema.Index{
			{
				Name:    "webhookhistory_history_time",
				Unique:  false,
				Columns: []*schema.Column{WebhookHistoryColumns[1]},
			},
		},
	}
	// ContactFilesColumns holds the columns for the "contact_files" table.
	ContactFilesColumns = []*schema.Column{
		{Name: "contact_id", Type: field.TypeString},
		{Name: "file_id", Type: field.TypeString},
	}
	// ContactFilesTable holds the schema information for the "contact_files" table.
	ContactFilesTable = &schema.Table{
		Name:       "contact_files",
		Columns:    ContactFilesColumns,
		PrimaryKey: []*schema.Column{ContactFilesColumns[0], ContactFilesColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "contact_files_contact_id",
				Columns:    []*schema.Column{ContactFilesColumns[0]},
				RefColumns: []*schema.Column{ContactsColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "contact_files_file_id",
				Columns:    []*schema.Column{ContactFilesColumns[1]},
				RefColumns: []*schema.Column{FilesColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// DocumentDataFilesColumns holds the columns for the "document_data_files" table.
	DocumentDataFilesColumns = []*schema.Column{
		{Name: "document_data_id", Type: field.TypeString},
		{Name: "file_id", Type: field.TypeString},
	}
	// DocumentDataFilesTable holds the schema information for the "document_data_files" table.
	DocumentDataFilesTable = &schema.Table{
		Name:       "document_data_files",
		Columns:    DocumentDataFilesColumns,
		PrimaryKey: []*schema.Column{DocumentDataFilesColumns[0], DocumentDataFilesColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "document_data_files_document_data_id",
				Columns:    []*schema.Column{DocumentDataFilesColumns[0]},
				RefColumns: []*schema.Column{DocumentDataColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "document_data_files_file_id",
				Columns:    []*schema.Column{DocumentDataFilesColumns[1]},
				RefColumns: []*schema.Column{FilesColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// EntitlementEventsColumns holds the columns for the "entitlement_events" table.
	EntitlementEventsColumns = []*schema.Column{
		{Name: "entitlement_id", Type: field.TypeString},
		{Name: "event_id", Type: field.TypeString},
	}
	// EntitlementEventsTable holds the schema information for the "entitlement_events" table.
	EntitlementEventsTable = &schema.Table{
		Name:       "entitlement_events",
		Columns:    EntitlementEventsColumns,
		PrimaryKey: []*schema.Column{EntitlementEventsColumns[0], EntitlementEventsColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "entitlement_events_entitlement_id",
				Columns:    []*schema.Column{EntitlementEventsColumns[0]},
				RefColumns: []*schema.Column{EntitlementsColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "entitlement_events_event_id",
				Columns:    []*schema.Column{EntitlementEventsColumns[1]},
				RefColumns: []*schema.Column{EventsColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// EntitlementPlanEventsColumns holds the columns for the "entitlement_plan_events" table.
	EntitlementPlanEventsColumns = []*schema.Column{
		{Name: "entitlement_plan_id", Type: field.TypeString},
		{Name: "event_id", Type: field.TypeString},
	}
	// EntitlementPlanEventsTable holds the schema information for the "entitlement_plan_events" table.
	EntitlementPlanEventsTable = &schema.Table{
		Name:       "entitlement_plan_events",
		Columns:    EntitlementPlanEventsColumns,
		PrimaryKey: []*schema.Column{EntitlementPlanEventsColumns[0], EntitlementPlanEventsColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "entitlement_plan_events_entitlement_plan_id",
				Columns:    []*schema.Column{EntitlementPlanEventsColumns[0]},
				RefColumns: []*schema.Column{EntitlementPlansColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "entitlement_plan_events_event_id",
				Columns:    []*schema.Column{EntitlementPlanEventsColumns[1]},
				RefColumns: []*schema.Column{EventsColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// EntitlementPlanFeatureEventsColumns holds the columns for the "entitlement_plan_feature_events" table.
	EntitlementPlanFeatureEventsColumns = []*schema.Column{
		{Name: "entitlement_plan_feature_id", Type: field.TypeString},
		{Name: "event_id", Type: field.TypeString},
	}
	// EntitlementPlanFeatureEventsTable holds the schema information for the "entitlement_plan_feature_events" table.
	EntitlementPlanFeatureEventsTable = &schema.Table{
		Name:       "entitlement_plan_feature_events",
		Columns:    EntitlementPlanFeatureEventsColumns,
		PrimaryKey: []*schema.Column{EntitlementPlanFeatureEventsColumns[0], EntitlementPlanFeatureEventsColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "entitlement_plan_feature_events_entitlement_plan_feature_id",
				Columns:    []*schema.Column{EntitlementPlanFeatureEventsColumns[0]},
				RefColumns: []*schema.Column{EntitlementPlanFeaturesColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "entitlement_plan_feature_events_event_id",
				Columns:    []*schema.Column{EntitlementPlanFeatureEventsColumns[1]},
				RefColumns: []*schema.Column{EventsColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// EntityContactsColumns holds the columns for the "entity_contacts" table.
	EntityContactsColumns = []*schema.Column{
		{Name: "entity_id", Type: field.TypeString},
		{Name: "contact_id", Type: field.TypeString},
	}
	// EntityContactsTable holds the schema information for the "entity_contacts" table.
	EntityContactsTable = &schema.Table{
		Name:       "entity_contacts",
		Columns:    EntityContactsColumns,
		PrimaryKey: []*schema.Column{EntityContactsColumns[0], EntityContactsColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "entity_contacts_entity_id",
				Columns:    []*schema.Column{EntityContactsColumns[0]},
				RefColumns: []*schema.Column{EntitiesColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "entity_contacts_contact_id",
				Columns:    []*schema.Column{EntityContactsColumns[1]},
				RefColumns: []*schema.Column{ContactsColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// EntityDocumentsColumns holds the columns for the "entity_documents" table.
	EntityDocumentsColumns = []*schema.Column{
		{Name: "entity_id", Type: field.TypeString},
		{Name: "document_data_id", Type: field.TypeString},
	}
	// EntityDocumentsTable holds the schema information for the "entity_documents" table.
	EntityDocumentsTable = &schema.Table{
		Name:       "entity_documents",
		Columns:    EntityDocumentsColumns,
		PrimaryKey: []*schema.Column{EntityDocumentsColumns[0], EntityDocumentsColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "entity_documents_entity_id",
				Columns:    []*schema.Column{EntityDocumentsColumns[0]},
				RefColumns: []*schema.Column{EntitiesColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "entity_documents_document_data_id",
				Columns:    []*schema.Column{EntityDocumentsColumns[1]},
				RefColumns: []*schema.Column{DocumentDataColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// EntityFilesColumns holds the columns for the "entity_files" table.
	EntityFilesColumns = []*schema.Column{
		{Name: "entity_id", Type: field.TypeString},
		{Name: "file_id", Type: field.TypeString},
	}
	// EntityFilesTable holds the schema information for the "entity_files" table.
	EntityFilesTable = &schema.Table{
		Name:       "entity_files",
		Columns:    EntityFilesColumns,
		PrimaryKey: []*schema.Column{EntityFilesColumns[0], EntityFilesColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "entity_files_entity_id",
				Columns:    []*schema.Column{EntityFilesColumns[0]},
				RefColumns: []*schema.Column{EntitiesColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "entity_files_file_id",
				Columns:    []*schema.Column{EntityFilesColumns[1]},
				RefColumns: []*schema.Column{FilesColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// FeatureEventsColumns holds the columns for the "feature_events" table.
	FeatureEventsColumns = []*schema.Column{
		{Name: "feature_id", Type: field.TypeString},
		{Name: "event_id", Type: field.TypeString},
	}
	// FeatureEventsTable holds the schema information for the "feature_events" table.
	FeatureEventsTable = &schema.Table{
		Name:       "feature_events",
		Columns:    FeatureEventsColumns,
		PrimaryKey: []*schema.Column{FeatureEventsColumns[0], FeatureEventsColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "feature_events_feature_id",
				Columns:    []*schema.Column{FeatureEventsColumns[0]},
				RefColumns: []*schema.Column{FeaturesColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "feature_events_event_id",
				Columns:    []*schema.Column{FeatureEventsColumns[1]},
				RefColumns: []*schema.Column{EventsColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// FileEventsColumns holds the columns for the "file_events" table.
	FileEventsColumns = []*schema.Column{
		{Name: "file_id", Type: field.TypeString},
		{Name: "event_id", Type: field.TypeString},
	}
	// FileEventsTable holds the schema information for the "file_events" table.
	FileEventsTable = &schema.Table{
		Name:       "file_events",
		Columns:    FileEventsColumns,
		PrimaryKey: []*schema.Column{FileEventsColumns[0], FileEventsColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "file_events_file_id",
				Columns:    []*schema.Column{FileEventsColumns[0]},
				RefColumns: []*schema.Column{FilesColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "file_events_event_id",
				Columns:    []*schema.Column{FileEventsColumns[1]},
				RefColumns: []*schema.Column{EventsColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// GroupEventsColumns holds the columns for the "group_events" table.
	GroupEventsColumns = []*schema.Column{
		{Name: "group_id", Type: field.TypeString},
		{Name: "event_id", Type: field.TypeString},
	}
	// GroupEventsTable holds the schema information for the "group_events" table.
	GroupEventsTable = &schema.Table{
		Name:       "group_events",
		Columns:    GroupEventsColumns,
		PrimaryKey: []*schema.Column{GroupEventsColumns[0], GroupEventsColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "group_events_group_id",
				Columns:    []*schema.Column{GroupEventsColumns[0]},
				RefColumns: []*schema.Column{GroupsColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "group_events_event_id",
				Columns:    []*schema.Column{GroupEventsColumns[1]},
				RefColumns: []*schema.Column{EventsColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// GroupFilesColumns holds the columns for the "group_files" table.
	GroupFilesColumns = []*schema.Column{
		{Name: "group_id", Type: field.TypeString},
		{Name: "file_id", Type: field.TypeString},
	}
	// GroupFilesTable holds the schema information for the "group_files" table.
	GroupFilesTable = &schema.Table{
		Name:       "group_files",
		Columns:    GroupFilesColumns,
		PrimaryKey: []*schema.Column{GroupFilesColumns[0], GroupFilesColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "group_files_group_id",
				Columns:    []*schema.Column{GroupFilesColumns[0]},
				RefColumns: []*schema.Column{GroupsColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "group_files_file_id",
				Columns:    []*schema.Column{GroupFilesColumns[1]},
				RefColumns: []*schema.Column{FilesColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// GroupMembershipEventsColumns holds the columns for the "group_membership_events" table.
	GroupMembershipEventsColumns = []*schema.Column{
		{Name: "group_membership_id", Type: field.TypeString},
		{Name: "event_id", Type: field.TypeString},
	}
	// GroupMembershipEventsTable holds the schema information for the "group_membership_events" table.
	GroupMembershipEventsTable = &schema.Table{
		Name:       "group_membership_events",
		Columns:    GroupMembershipEventsColumns,
		PrimaryKey: []*schema.Column{GroupMembershipEventsColumns[0], GroupMembershipEventsColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "group_membership_events_group_membership_id",
				Columns:    []*schema.Column{GroupMembershipEventsColumns[0]},
				RefColumns: []*schema.Column{GroupMembershipsColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "group_membership_events_event_id",
				Columns:    []*schema.Column{GroupMembershipEventsColumns[1]},
				RefColumns: []*schema.Column{EventsColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// HushEventsColumns holds the columns for the "hush_events" table.
	HushEventsColumns = []*schema.Column{
		{Name: "hush_id", Type: field.TypeString},
		{Name: "event_id", Type: field.TypeString},
	}
	// HushEventsTable holds the schema information for the "hush_events" table.
	HushEventsTable = &schema.Table{
		Name:       "hush_events",
		Columns:    HushEventsColumns,
		PrimaryKey: []*schema.Column{HushEventsColumns[0], HushEventsColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "hush_events_hush_id",
				Columns:    []*schema.Column{HushEventsColumns[0]},
				RefColumns: []*schema.Column{HushesColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "hush_events_event_id",
				Columns:    []*schema.Column{HushEventsColumns[1]},
				RefColumns: []*schema.Column{EventsColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// IntegrationSecretsColumns holds the columns for the "integration_secrets" table.
	IntegrationSecretsColumns = []*schema.Column{
		{Name: "integration_id", Type: field.TypeString},
		{Name: "hush_id", Type: field.TypeString},
	}
	// IntegrationSecretsTable holds the schema information for the "integration_secrets" table.
	IntegrationSecretsTable = &schema.Table{
		Name:       "integration_secrets",
		Columns:    IntegrationSecretsColumns,
		PrimaryKey: []*schema.Column{IntegrationSecretsColumns[0], IntegrationSecretsColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "integration_secrets_integration_id",
				Columns:    []*schema.Column{IntegrationSecretsColumns[0]},
				RefColumns: []*schema.Column{IntegrationsColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "integration_secrets_hush_id",
				Columns:    []*schema.Column{IntegrationSecretsColumns[1]},
				RefColumns: []*schema.Column{HushesColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// IntegrationOauth2tokensColumns holds the columns for the "integration_oauth2tokens" table.
	IntegrationOauth2tokensColumns = []*schema.Column{
		{Name: "integration_id", Type: field.TypeString},
		{Name: "oh_auth_too_token_id", Type: field.TypeString},
	}
	// IntegrationOauth2tokensTable holds the schema information for the "integration_oauth2tokens" table.
	IntegrationOauth2tokensTable = &schema.Table{
		Name:       "integration_oauth2tokens",
		Columns:    IntegrationOauth2tokensColumns,
		PrimaryKey: []*schema.Column{IntegrationOauth2tokensColumns[0], IntegrationOauth2tokensColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "integration_oauth2tokens_integration_id",
				Columns:    []*schema.Column{IntegrationOauth2tokensColumns[0]},
				RefColumns: []*schema.Column{IntegrationsColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "integration_oauth2tokens_oh_auth_too_token_id",
				Columns:    []*schema.Column{IntegrationOauth2tokensColumns[1]},
				RefColumns: []*schema.Column{OhAuthTooTokensColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// IntegrationEventsColumns holds the columns for the "integration_events" table.
	IntegrationEventsColumns = []*schema.Column{
		{Name: "integration_id", Type: field.TypeString},
		{Name: "event_id", Type: field.TypeString},
	}
	// IntegrationEventsTable holds the schema information for the "integration_events" table.
	IntegrationEventsTable = &schema.Table{
		Name:       "integration_events",
		Columns:    IntegrationEventsColumns,
		PrimaryKey: []*schema.Column{IntegrationEventsColumns[0], IntegrationEventsColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "integration_events_integration_id",
				Columns:    []*schema.Column{IntegrationEventsColumns[0]},
				RefColumns: []*schema.Column{IntegrationsColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "integration_events_event_id",
				Columns:    []*schema.Column{IntegrationEventsColumns[1]},
				RefColumns: []*schema.Column{EventsColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// IntegrationWebhooksColumns holds the columns for the "integration_webhooks" table.
	IntegrationWebhooksColumns = []*schema.Column{
		{Name: "integration_id", Type: field.TypeString},
		{Name: "webhook_id", Type: field.TypeString},
	}
	// IntegrationWebhooksTable holds the schema information for the "integration_webhooks" table.
	IntegrationWebhooksTable = &schema.Table{
		Name:       "integration_webhooks",
		Columns:    IntegrationWebhooksColumns,
		PrimaryKey: []*schema.Column{IntegrationWebhooksColumns[0], IntegrationWebhooksColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "integration_webhooks_integration_id",
				Columns:    []*schema.Column{IntegrationWebhooksColumns[0]},
				RefColumns: []*schema.Column{IntegrationsColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "integration_webhooks_webhook_id",
				Columns:    []*schema.Column{IntegrationWebhooksColumns[1]},
				RefColumns: []*schema.Column{WebhooksColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// InviteEventsColumns holds the columns for the "invite_events" table.
	InviteEventsColumns = []*schema.Column{
		{Name: "invite_id", Type: field.TypeString},
		{Name: "event_id", Type: field.TypeString},
	}
	// InviteEventsTable holds the schema information for the "invite_events" table.
	InviteEventsTable = &schema.Table{
		Name:       "invite_events",
		Columns:    InviteEventsColumns,
		PrimaryKey: []*schema.Column{InviteEventsColumns[0], InviteEventsColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "invite_events_invite_id",
				Columns:    []*schema.Column{InviteEventsColumns[0]},
				RefColumns: []*schema.Column{InvitesColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "invite_events_event_id",
				Columns:    []*schema.Column{InviteEventsColumns[1]},
				RefColumns: []*schema.Column{EventsColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// OhAuthTooTokenEventsColumns holds the columns for the "oh_auth_too_token_events" table.
	OhAuthTooTokenEventsColumns = []*schema.Column{
		{Name: "oh_auth_too_token_id", Type: field.TypeString},
		{Name: "event_id", Type: field.TypeString},
	}
	// OhAuthTooTokenEventsTable holds the schema information for the "oh_auth_too_token_events" table.
	OhAuthTooTokenEventsTable = &schema.Table{
		Name:       "oh_auth_too_token_events",
		Columns:    OhAuthTooTokenEventsColumns,
		PrimaryKey: []*schema.Column{OhAuthTooTokenEventsColumns[0], OhAuthTooTokenEventsColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "oh_auth_too_token_events_oh_auth_too_token_id",
				Columns:    []*schema.Column{OhAuthTooTokenEventsColumns[0]},
				RefColumns: []*schema.Column{OhAuthTooTokensColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "oh_auth_too_token_events_event_id",
				Columns:    []*schema.Column{OhAuthTooTokenEventsColumns[1]},
				RefColumns: []*schema.Column{EventsColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// OrgMembershipEventsColumns holds the columns for the "org_membership_events" table.
	OrgMembershipEventsColumns = []*schema.Column{
		{Name: "org_membership_id", Type: field.TypeString},
		{Name: "event_id", Type: field.TypeString},
	}
	// OrgMembershipEventsTable holds the schema information for the "org_membership_events" table.
	OrgMembershipEventsTable = &schema.Table{
		Name:       "org_membership_events",
		Columns:    OrgMembershipEventsColumns,
		PrimaryKey: []*schema.Column{OrgMembershipEventsColumns[0], OrgMembershipEventsColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "org_membership_events_org_membership_id",
				Columns:    []*schema.Column{OrgMembershipEventsColumns[0]},
				RefColumns: []*schema.Column{OrgMembershipsColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "org_membership_events_event_id",
				Columns:    []*schema.Column{OrgMembershipEventsColumns[1]},
				RefColumns: []*schema.Column{EventsColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// OrganizationPersonalAccessTokensColumns holds the columns for the "organization_personal_access_tokens" table.
	OrganizationPersonalAccessTokensColumns = []*schema.Column{
		{Name: "organization_id", Type: field.TypeString},
		{Name: "personal_access_token_id", Type: field.TypeString},
	}
	// OrganizationPersonalAccessTokensTable holds the schema information for the "organization_personal_access_tokens" table.
	OrganizationPersonalAccessTokensTable = &schema.Table{
		Name:       "organization_personal_access_tokens",
		Columns:    OrganizationPersonalAccessTokensColumns,
		PrimaryKey: []*schema.Column{OrganizationPersonalAccessTokensColumns[0], OrganizationPersonalAccessTokensColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "organization_personal_access_tokens_organization_id",
				Columns:    []*schema.Column{OrganizationPersonalAccessTokensColumns[0]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "organization_personal_access_tokens_personal_access_token_id",
				Columns:    []*schema.Column{OrganizationPersonalAccessTokensColumns[1]},
				RefColumns: []*schema.Column{PersonalAccessTokensColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// OrganizationEventsColumns holds the columns for the "organization_events" table.
	OrganizationEventsColumns = []*schema.Column{
		{Name: "organization_id", Type: field.TypeString},
		{Name: "event_id", Type: field.TypeString},
	}
	// OrganizationEventsTable holds the schema information for the "organization_events" table.
	OrganizationEventsTable = &schema.Table{
		Name:       "organization_events",
		Columns:    OrganizationEventsColumns,
		PrimaryKey: []*schema.Column{OrganizationEventsColumns[0], OrganizationEventsColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "organization_events_organization_id",
				Columns:    []*schema.Column{OrganizationEventsColumns[0]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "organization_events_event_id",
				Columns:    []*schema.Column{OrganizationEventsColumns[1]},
				RefColumns: []*schema.Column{EventsColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// OrganizationSecretsColumns holds the columns for the "organization_secrets" table.
	OrganizationSecretsColumns = []*schema.Column{
		{Name: "organization_id", Type: field.TypeString},
		{Name: "hush_id", Type: field.TypeString},
	}
	// OrganizationSecretsTable holds the schema information for the "organization_secrets" table.
	OrganizationSecretsTable = &schema.Table{
		Name:       "organization_secrets",
		Columns:    OrganizationSecretsColumns,
		PrimaryKey: []*schema.Column{OrganizationSecretsColumns[0], OrganizationSecretsColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "organization_secrets_organization_id",
				Columns:    []*schema.Column{OrganizationSecretsColumns[0]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "organization_secrets_hush_id",
				Columns:    []*schema.Column{OrganizationSecretsColumns[1]},
				RefColumns: []*schema.Column{HushesColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// OrganizationFilesColumns holds the columns for the "organization_files" table.
	OrganizationFilesColumns = []*schema.Column{
		{Name: "organization_id", Type: field.TypeString},
		{Name: "file_id", Type: field.TypeString},
	}
	// OrganizationFilesTable holds the schema information for the "organization_files" table.
	OrganizationFilesTable = &schema.Table{
		Name:       "organization_files",
		Columns:    OrganizationFilesColumns,
		PrimaryKey: []*schema.Column{OrganizationFilesColumns[0], OrganizationFilesColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "organization_files_organization_id",
				Columns:    []*schema.Column{OrganizationFilesColumns[0]},
				RefColumns: []*schema.Column{OrganizationsColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "organization_files_file_id",
				Columns:    []*schema.Column{OrganizationFilesColumns[1]},
				RefColumns: []*schema.Column{FilesColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// OrganizationSettingFilesColumns holds the columns for the "organization_setting_files" table.
	OrganizationSettingFilesColumns = []*schema.Column{
		{Name: "organization_setting_id", Type: field.TypeString},
		{Name: "file_id", Type: field.TypeString},
	}
	// OrganizationSettingFilesTable holds the schema information for the "organization_setting_files" table.
	OrganizationSettingFilesTable = &schema.Table{
		Name:       "organization_setting_files",
		Columns:    OrganizationSettingFilesColumns,
		PrimaryKey: []*schema.Column{OrganizationSettingFilesColumns[0], OrganizationSettingFilesColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "organization_setting_files_organization_setting_id",
				Columns:    []*schema.Column{OrganizationSettingFilesColumns[0]},
				RefColumns: []*schema.Column{OrganizationSettingsColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "organization_setting_files_file_id",
				Columns:    []*schema.Column{OrganizationSettingFilesColumns[1]},
				RefColumns: []*schema.Column{FilesColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// PersonalAccessTokenEventsColumns holds the columns for the "personal_access_token_events" table.
	PersonalAccessTokenEventsColumns = []*schema.Column{
		{Name: "personal_access_token_id", Type: field.TypeString},
		{Name: "event_id", Type: field.TypeString},
	}
	// PersonalAccessTokenEventsTable holds the schema information for the "personal_access_token_events" table.
	PersonalAccessTokenEventsTable = &schema.Table{
		Name:       "personal_access_token_events",
		Columns:    PersonalAccessTokenEventsColumns,
		PrimaryKey: []*schema.Column{PersonalAccessTokenEventsColumns[0], PersonalAccessTokenEventsColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "personal_access_token_events_personal_access_token_id",
				Columns:    []*schema.Column{PersonalAccessTokenEventsColumns[0]},
				RefColumns: []*schema.Column{PersonalAccessTokensColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "personal_access_token_events_event_id",
				Columns:    []*schema.Column{PersonalAccessTokenEventsColumns[1]},
				RefColumns: []*schema.Column{EventsColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// SubscriberEventsColumns holds the columns for the "subscriber_events" table.
	SubscriberEventsColumns = []*schema.Column{
		{Name: "subscriber_id", Type: field.TypeString},
		{Name: "event_id", Type: field.TypeString},
	}
	// SubscriberEventsTable holds the schema information for the "subscriber_events" table.
	SubscriberEventsTable = &schema.Table{
		Name:       "subscriber_events",
		Columns:    SubscriberEventsColumns,
		PrimaryKey: []*schema.Column{SubscriberEventsColumns[0], SubscriberEventsColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "subscriber_events_subscriber_id",
				Columns:    []*schema.Column{SubscriberEventsColumns[0]},
				RefColumns: []*schema.Column{SubscribersColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "subscriber_events_event_id",
				Columns:    []*schema.Column{SubscriberEventsColumns[1]},
				RefColumns: []*schema.Column{EventsColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// TemplateFilesColumns holds the columns for the "template_files" table.
	TemplateFilesColumns = []*schema.Column{
		{Name: "template_id", Type: field.TypeString},
		{Name: "file_id", Type: field.TypeString},
	}
	// TemplateFilesTable holds the schema information for the "template_files" table.
	TemplateFilesTable = &schema.Table{
		Name:       "template_files",
		Columns:    TemplateFilesColumns,
		PrimaryKey: []*schema.Column{TemplateFilesColumns[0], TemplateFilesColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "template_files_template_id",
				Columns:    []*schema.Column{TemplateFilesColumns[0]},
				RefColumns: []*schema.Column{TemplatesColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "template_files_file_id",
				Columns:    []*schema.Column{TemplateFilesColumns[1]},
				RefColumns: []*schema.Column{FilesColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// UserFilesColumns holds the columns for the "user_files" table.
	UserFilesColumns = []*schema.Column{
		{Name: "user_id", Type: field.TypeString},
		{Name: "file_id", Type: field.TypeString},
	}
	// UserFilesTable holds the schema information for the "user_files" table.
	UserFilesTable = &schema.Table{
		Name:       "user_files",
		Columns:    UserFilesColumns,
		PrimaryKey: []*schema.Column{UserFilesColumns[0], UserFilesColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "user_files_user_id",
				Columns:    []*schema.Column{UserFilesColumns[0]},
				RefColumns: []*schema.Column{UsersColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "user_files_file_id",
				Columns:    []*schema.Column{UserFilesColumns[1]},
				RefColumns: []*schema.Column{FilesColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// UserEventsColumns holds the columns for the "user_events" table.
	UserEventsColumns = []*schema.Column{
		{Name: "user_id", Type: field.TypeString},
		{Name: "event_id", Type: field.TypeString},
	}
	// UserEventsTable holds the schema information for the "user_events" table.
	UserEventsTable = &schema.Table{
		Name:       "user_events",
		Columns:    UserEventsColumns,
		PrimaryKey: []*schema.Column{UserEventsColumns[0], UserEventsColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "user_events_user_id",
				Columns:    []*schema.Column{UserEventsColumns[0]},
				RefColumns: []*schema.Column{UsersColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "user_events_event_id",
				Columns:    []*schema.Column{UserEventsColumns[1]},
				RefColumns: []*schema.Column{EventsColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// UserSettingFilesColumns holds the columns for the "user_setting_files" table.
	UserSettingFilesColumns = []*schema.Column{
		{Name: "user_setting_id", Type: field.TypeString},
		{Name: "file_id", Type: field.TypeString},
	}
	// UserSettingFilesTable holds the schema information for the "user_setting_files" table.
	UserSettingFilesTable = &schema.Table{
		Name:       "user_setting_files",
		Columns:    UserSettingFilesColumns,
		PrimaryKey: []*schema.Column{UserSettingFilesColumns[0], UserSettingFilesColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "user_setting_files_user_setting_id",
				Columns:    []*schema.Column{UserSettingFilesColumns[0]},
				RefColumns: []*schema.Column{UserSettingsColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "user_setting_files_file_id",
				Columns:    []*schema.Column{UserSettingFilesColumns[1]},
				RefColumns: []*schema.Column{FilesColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// WebhookEventsColumns holds the columns for the "webhook_events" table.
	WebhookEventsColumns = []*schema.Column{
		{Name: "webhook_id", Type: field.TypeString},
		{Name: "event_id", Type: field.TypeString},
	}
	// WebhookEventsTable holds the schema information for the "webhook_events" table.
	WebhookEventsTable = &schema.Table{
		Name:       "webhook_events",
		Columns:    WebhookEventsColumns,
		PrimaryKey: []*schema.Column{WebhookEventsColumns[0], WebhookEventsColumns[1]},
		ForeignKeys: []*schema.ForeignKey{
			{
				Symbol:     "webhook_events_webhook_id",
				Columns:    []*schema.Column{WebhookEventsColumns[0]},
				RefColumns: []*schema.Column{WebhooksColumns[0]},
				OnDelete:   schema.Cascade,
			},
			{
				Symbol:     "webhook_events_event_id",
				Columns:    []*schema.Column{WebhookEventsColumns[1]},
				RefColumns: []*schema.Column{EventsColumns[0]},
				OnDelete:   schema.Cascade,
			},
		},
	}
	// Tables holds all the tables in the schema.
	Tables = []*schema.Table{
		APITokensTable,
		ContactsTable,
		ContactHistoryTable,
		DocumentDataTable,
		DocumentDataHistoryTable,
		EmailVerificationTokensTable,
		EntitlementsTable,
		EntitlementHistoryTable,
		EntitlementPlansTable,
		EntitlementPlanFeaturesTable,
		EntitlementPlanFeatureHistoryTable,
		EntitlementPlanHistoryTable,
		EntitiesTable,
		EntityHistoryTable,
		EntityTypesTable,
		EntityTypeHistoryTable,
		EventsTable,
		EventHistoryTable,
		FeaturesTable,
		FeatureHistoryTable,
		FilesTable,
		FileHistoryTable,
		GroupsTable,
		GroupHistoryTable,
		GroupMembershipsTable,
		GroupMembershipHistoryTable,
		GroupSettingsTable,
		GroupSettingHistoryTable,
		HushesTable,
		HushHistoryTable,
		IntegrationsTable,
		IntegrationHistoryTable,
		InvitesTable,
		NotesTable,
		NoteHistoryTable,
		OauthProvidersTable,
		OauthProviderHistoryTable,
		OhAuthTooTokensTable,
		OrgMembershipsTable,
		OrgMembershipHistoryTable,
		OrganizationsTable,
		OrganizationHistoryTable,
		OrganizationSettingsTable,
		OrganizationSettingHistoryTable,
		PasswordResetTokensTable,
		PersonalAccessTokensTable,
		SubscribersTable,
		TfaSettingsTable,
		TemplatesTable,
		TemplateHistoryTable,
		UsersTable,
		UserHistoryTable,
		UserSettingsTable,
		UserSettingHistoryTable,
		WebauthnsTable,
		WebhooksTable,
		WebhookHistoryTable,
		ContactFilesTable,
		DocumentDataFilesTable,
		EntitlementEventsTable,
		EntitlementPlanEventsTable,
		EntitlementPlanFeatureEventsTable,
		EntityContactsTable,
		EntityDocumentsTable,
		EntityFilesTable,
		FeatureEventsTable,
		FileEventsTable,
		GroupEventsTable,
		GroupFilesTable,
		GroupMembershipEventsTable,
		HushEventsTable,
		IntegrationSecretsTable,
		IntegrationOauth2tokensTable,
		IntegrationEventsTable,
		IntegrationWebhooksTable,
		InviteEventsTable,
		OhAuthTooTokenEventsTable,
		OrgMembershipEventsTable,
		OrganizationPersonalAccessTokensTable,
		OrganizationEventsTable,
		OrganizationSecretsTable,
		OrganizationFilesTable,
		OrganizationSettingFilesTable,
		PersonalAccessTokenEventsTable,
		SubscriberEventsTable,
		TemplateFilesTable,
		UserFilesTable,
		UserEventsTable,
		UserSettingFilesTable,
		WebhookEventsTable,
	}
)

Functions

func Create

func Create(ctx context.Context, s *Schema, tables []*schema.Table, opts ...schema.MigrateOption) error

Create creates all table resources using the given schema driver.

func Diff

func Diff(ctx context.Context, url string, opts ...schema.MigrateOption) error

Diff compares the state read from a database connection or migration directory with the state defined by the Ent schema. Changes will be written to new migration files.

func NamedDiff

func NamedDiff(ctx context.Context, url, name string, opts ...schema.MigrateOption) error

NamedDiff compares the state read from a database connection or migration directory with the state defined by the Ent schema. Changes will be written to new named migration files.

Types

type Schema

type Schema struct {
	// contains filtered or unexported fields
}

Schema is the API for creating, migrating and dropping a schema.

func NewSchema

func NewSchema(drv dialect.Driver) *Schema

NewSchema creates a new schema client.

func (*Schema) Create

func (s *Schema) Create(ctx context.Context, opts ...schema.MigrateOption) error

Create creates all schema resources.

func (*Schema) Diff

func (s *Schema) Diff(ctx context.Context, opts ...schema.MigrateOption) error

Diff creates a migration file containing the statements to resolve the diff between the Ent schema and the connected database.

func (*Schema) NamedDiff

func (s *Schema) NamedDiff(ctx context.Context, name string, opts ...schema.MigrateOption) error

NamedDiff creates a named migration file containing the statements to resolve the diff between the Ent schema and the connected database.

func (*Schema) WriteTo

func (s *Schema) WriteTo(ctx context.Context, w io.Writer, opts ...schema.MigrateOption) error

WriteTo writes the schema changes to w instead of running them against the database.

if err := client.Schema.WriteTo(context.Background(), os.Stdout); err != nil {
	log.Fatal(err)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL