New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Render models with the new datamodel renderer #3333
Render models with the new datamodel renderer #3333
Conversation
3153c83
to
6f7af32
Compare
67901e0
to
381754d
Compare
381754d
to
235b53a
Compare
@@ -120,248 +120,3 @@ fn non_clustered_compound_id_works_on_sql_server() { | |||
clustered: Some(false), | |||
}); | |||
} | |||
|
|||
#[test] | |||
fn do_not_render_id_default_clustering() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are all tested in intro.
@@ -163,22 +162,6 @@ fn multiple_index_must_work() { | |||
}); | |||
} | |||
|
|||
#[test] | |||
fn index_attributes_must_serialize_to_valid_dml() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We test these extensively in intro.
@@ -249,222 +248,6 @@ fn allow_explicit_fk_name_definition() { | |||
.assert_relation_fk_name(Some("CustomFKName".to_string())); | |||
} | |||
|
|||
#[test] | |||
fn allow_implicit_fk_name_definition() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The DML has a wiped constraint name for default values.
We test these in the ME.
@@ -281,22 +280,6 @@ fn single_field_unique_indexes_on_enum_fields_must_work() { | |||
}); | |||
} | |||
|
|||
#[test] | |||
fn unique_attributes_must_serialize_to_valid_dml() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested in intro.
use crate::common::*; | ||
|
||
#[test] | ||
fn parse_unsupported_types() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Parsing tested in many places in PSL. Rendering tested in intro.
@@ -1,116 +0,0 @@ | |||
use crate::{common::*, with_header, Provider}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All tested in intro/migrations.
use psl::dml::{DefaultValue, PrismaValue}; | ||
|
||
#[test] | ||
fn strings_with_quotes_render_as_escaped_literals() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added one test for this to intro. Migrations are already testing these.
use crate::common::*; | ||
|
||
#[test] | ||
fn test_must_not_render_relation_fields_with_many_to_many() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatter tests?
} | ||
|
||
#[test] | ||
fn test_exclude_default_relation_names_from_rendering() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Part of: prisma/prisma#15800
Some of the rendering tests we should maybe redo in introspection. Let's see about that in the upcoming PRs. Lot of the code from here we can remove when we remove DML from introspection.