Skip to content

Commit

Permalink
chore: make datasource fkey non-nullable (#1255)
Browse files Browse the repository at this point in the history
  • Loading branch information
fontanierh authored Sep 5, 2023
1 parent bbf2419 commit 7a3f1f3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions front/lib/models/data_source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class DataSource extends Model<
declare dustAPIProjectId: string;
declare connectorId: string | null;
declare connectorProvider: ConnectorProvider | null;
declare workspaceId: ForeignKey<Workspace["id"]> | null;
declare workspaceId: ForeignKey<Workspace["id"]>;
}

DataSource.init(
Expand Down Expand Up @@ -87,4 +87,7 @@ DataSource.init(
],
}
);
Workspace.hasMany(DataSource);
Workspace.hasMany(DataSource, {
foreignKey: { allowNull: false },
onDelete: "CASCADE",
});

0 comments on commit 7a3f1f3

Please sign in to comment.