Skip to content

Commit

Permalink
what if we just comment them out
Browse files Browse the repository at this point in the history
+ formatting
  • Loading branch information
Druue committed Jun 6, 2023
1 parent 37e4197 commit a9f30df
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ fn render_model(model: ModelPair<'_>, sql_family: SqlFamily) -> renderer::Model<
if model.is_foreign_data_wrapper() {
let docs = "This model represents a foreign data wrapper which requires additional setup for migrations. Visit https://pris.ly/d/fdw for more info.";
rendered.documentation(docs);
rendered.comment_out();
}

for field in model.scalar_fields() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ datasource db {
/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client.
/// This model represents a foreign data wrapper which requires additional setup for migrations. Visit https://pris.ly/d/fdw for more info.
model bar {
id Int @default(autoincrement())
@@ignore
}
// model bar {
// id Int @default(autoincrement())
// @@ignore
// }
*/
6 changes: 3 additions & 3 deletions schema-engine/sql-schema-describer/src/postgres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -761,15 +761,15 @@ impl<'a> SqlSchemaDescriber<'a> {
table_name,
namespace,
is_partition,
is_foreign_table,
is_foreign_data_wrapper,
has_subclass,
has_row_level_security,
description,
) in names
{
let cloned_name = table_name.clone();

let foreign_wrapper = if is_foreign_table {
let foreign_data_wrapper = if is_foreign_data_wrapper {
BitFlags::from_flag(TableProperties::IsForeignWrapper)
} else {
BitFlags::empty()
Expand Down Expand Up @@ -801,7 +801,7 @@ impl<'a> SqlSchemaDescriber<'a> {
let id = sql_schema.push_table_with_properties(
table_name,
sql_schema.get_namespace_id(&namespace).unwrap(),
partition | subclass | row_level_security | foreign_wrapper,
partition | subclass | row_level_security | foreign_data_wrapper,
description,
);

Expand Down

0 comments on commit a9f30df

Please sign in to comment.