import{sqliteTable as i,text as e,integer as r,index as o,uniqueIndex as n}from"drizzle-orm/sqlite-core";const u=i("entities_relations",{id:e("id").primaryKey(),organizationId:e("organization_id").notNull(),projectId:e("project_id").notNull(),sourceKey:e("source_key").notNull(),sourceVersion:e("source_version").default("").notNull(),sourceRevision:e("source_revision").default("").notNull(),sourceToTargetRelation:e("source_to_target_relation").notNull(),targetKey:e("target_key").notNull(),targetVersion:e("target_version").default("").notNull(),targetRevision:e("target_revision").default("").notNull(),targetToSourceRelation:e("target_to_source_relation").notNull(),sourceFile:e("source_file"),fileHash:e("file_hash"),isDeleted:r("is_deleted",{mode:"boolean"}).default(!1),createdAt:e("created_at").notNull(),updatedAt:e("updated_at").notNull(),lastSeenRunId:e("last_seen_run_id")},t=>[o("idx_entities_relations_source_key").on(t.sourceKey,t.isDeleted),o("idx_entities_relations_target_key").on(t.targetKey,t.isDeleted),o("idx_entities_relations_source_target").on(t.sourceToTargetRelation),o("idx_entities_relations_target_source").on(t.targetToSourceRelation),n("idx_entities_relations_unique").on(t.sourceKey,t.targetKey,t.sourceVersion,t.targetVersion,t.sourceRevision,t.targetRevision,t.sourceToTargetRelation),o("idx_entities_relations_last_seen_run_id_source_file").on(t.lastSeenRunId,t.sourceFile)]);export{u as entitiesRelationsTable};
