Skip to content

Commit 9b91829

Browse files
committed
feat: rename @@schema to @@namespace incl all related code mentions
1 parent a5cc74b commit 9b91829

124 files changed

Lines changed: 875 additions & 871 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

prisma-fmt/src/code_actions.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
mod block;
22
mod field;
33
mod mongodb;
4-
mod multi_schema;
4+
mod multi_namespaces;
55
mod relation_mode;
66
mod relations;
77

@@ -94,9 +94,9 @@ pub(crate) fn available_actions(
9494
block::create_missing_block_for_model(&mut actions, &context, model);
9595

9696
if config.preview_features().contains(PreviewFeature::MultiSchema) {
97-
multi_schema::add_schema_block_attribute_model(&mut actions, &context, model);
97+
multi_namespaces::add_namespace_block_attribute_model(&mut actions, &context, model);
9898

99-
multi_schema::add_schema_to_schemas(&mut actions, &context, model);
99+
multi_namespaces::add_namespace_to_namespaces(&mut actions, &context, model);
100100
}
101101

102102
if matches!(datasource, Some(ds) if ds.active_provider == "mongodb") {
@@ -114,7 +114,7 @@ pub(crate) fn available_actions(
114114

115115
for enumerator in validated_schema.db.walk_enums_in_file(initiating_file_id) {
116116
if config.preview_features().contains(PreviewFeature::MultiSchema) {
117-
multi_schema::add_schema_block_attribute_enum(&mut actions, &context, enumerator);
117+
multi_namespaces::add_namespace_block_attribute_enum(&mut actions, &context, enumerator);
118118
}
119119
}
120120

prisma-fmt/src/code_actions/multi_schema.rs renamed to prisma-fmt/src/code_actions/multi_namespaces.rs

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use psl::{
77

88
use super::CodeActionsContext;
99

10-
pub(super) fn add_schema_block_attribute_model(
10+
pub(super) fn add_namespace_block_attribute_model(
1111
actions: &mut Vec<CodeActionOrCommand>,
1212
context: &CodeActionsContext<'_>,
1313
model: ModelWalker<'_>,
@@ -17,11 +17,11 @@ pub(super) fn add_schema_block_attribute_model(
1717
None => return,
1818
};
1919

20-
if datasource.schemas_span.is_none() {
20+
if datasource.namespaces_span.is_none() {
2121
return;
2222
}
2323

24-
if model.schema_name().is_some() {
24+
if model.namespace_name().is_some() {
2525
return;
2626
}
2727

@@ -31,15 +31,15 @@ pub(super) fn add_schema_block_attribute_model(
3131

3232
let diagnostics = context.diagnostics_for_span_with_message(
3333
model.ast_model().span(),
34-
"This model is missing an `@@schema` attribute.",
34+
"This model is missing an `@@namespace` attribute.",
3535
);
3636

3737
if diagnostics.is_empty() {
3838
return;
3939
}
4040

4141
let formatted_attribute = super::format_block_attribute(
42-
"schema()",
42+
"namespace()",
4343
model.indentation(),
4444
model.newline(),
4545
&model.ast_model().attributes,
@@ -56,7 +56,7 @@ pub(super) fn add_schema_block_attribute_model(
5656
};
5757

5858
let action = CodeAction {
59-
title: String::from("Add `@@schema` attribute"),
59+
title: String::from("Add `@@namespace` attribute"),
6060
kind: Some(CodeActionKind::QUICKFIX),
6161
edit: Some(edit),
6262
diagnostics: Some(diagnostics),
@@ -66,7 +66,7 @@ pub(super) fn add_schema_block_attribute_model(
6666
actions.push(CodeActionOrCommand::CodeAction(action))
6767
}
6868

69-
pub(super) fn add_schema_block_attribute_enum(
69+
pub(super) fn add_namespace_block_attribute_enum(
7070
actions: &mut Vec<CodeActionOrCommand>,
7171
context: &CodeActionsContext<'_>,
7272
enumerator: EnumWalker<'_>,
@@ -76,11 +76,11 @@ pub(super) fn add_schema_block_attribute_enum(
7676
None => return,
7777
};
7878

79-
if datasource.schemas_span.is_none() {
79+
if datasource.namespaces_span.is_none() {
8080
return;
8181
}
8282

83-
if enumerator.schema().is_some() {
83+
if enumerator.namespace().is_some() {
8484
return;
8585
}
8686

@@ -90,15 +90,15 @@ pub(super) fn add_schema_block_attribute_enum(
9090

9191
let diagnostics = context.diagnostics_for_span_with_message(
9292
enumerator.ast_enum().span(),
93-
"This enum is missing an `@@schema` attribute.",
93+
"This enum is missing an `@@namespace` attribute.",
9494
);
9595

9696
if diagnostics.is_empty() {
9797
return;
9898
}
9999

100100
let formatted_attribute = super::format_block_attribute(
101-
"schema()",
101+
"namespace()",
102102
enumerator.indentation(),
103103
enumerator.newline(),
104104
&enumerator.ast_enum().attributes,
@@ -115,7 +115,7 @@ pub(super) fn add_schema_block_attribute_enum(
115115
};
116116

117117
let action = CodeAction {
118-
title: String::from("Add `@@schema` attribute"),
118+
title: String::from("Add `@@namespace` attribute"),
119119
kind: Some(CodeActionKind::QUICKFIX),
120120
edit: Some(edit),
121121
diagnostics: Some(diagnostics),
@@ -125,7 +125,7 @@ pub(super) fn add_schema_block_attribute_enum(
125125
actions.push(CodeActionOrCommand::CodeAction(action))
126126
}
127127

128-
pub(super) fn add_schema_to_schemas(
128+
pub(super) fn add_namespace_to_namespaces(
129129
actions: &mut Vec<CodeActionOrCommand>,
130130
context: &CodeActionsContext<'_>,
131131
model: ModelWalker<'_>,
@@ -137,7 +137,7 @@ pub(super) fn add_schema_to_schemas(
137137

138138
let diagnostics = context.diagnostics_for_span_with_message(
139139
model.ast_model().span(),
140-
"This schema is not defined in the datasource.",
140+
"This namespace is not defined in the datasource.",
141141
);
142142

143143
if diagnostics.is_empty() {
@@ -148,9 +148,9 @@ pub(super) fn add_schema_to_schemas(
148148
let datasource_file_uri = context.db.file_name(datasource_file_id);
149149
let datasource_content = context.db.source(datasource_file_id);
150150

151-
let edit = match datasource.schemas_span {
151+
let edit = match datasource.namespaces_span {
152152
Some(span) => {
153-
let formatted_attribute = format!(r#"", "{}""#, model.schema_name().unwrap());
153+
let formatted_attribute = format!(r#"", "{}""#, model.namespace_name().unwrap());
154154
super::create_text_edit(
155155
datasource_file_uri,
156156
datasource_content,
@@ -165,11 +165,11 @@ pub(super) fn add_schema_to_schemas(
165165
|| datasource.direct_url_defined()
166166
|| datasource.shadow_url_defined()
167167
|| datasource.relation_mode_defined()
168-
|| datasource.schemas_defined();
168+
|| datasource.namespaces_defined();
169169

170170
let formatted_attribute = super::format_block_property(
171-
"schemas",
172-
model.schema_name().unwrap(),
171+
"namespaces",
172+
model.namespace_name().unwrap(),
173173
model.indentation(),
174174
model.newline(),
175175
has_properties,
@@ -190,7 +190,7 @@ pub(super) fn add_schema_to_schemas(
190190
};
191191

192192
let action = CodeAction {
193-
title: String::from("Add schema to schemas"),
193+
title: String::from("Add namespace to namespaces"),
194194
kind: Some(CodeActionKind::QUICKFIX),
195195
edit: Some(edit),
196196
diagnostics: Some(diagnostics),

prisma-fmt/src/get_config.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ mod tests {
223223
});
224224

225225
let expected = expect![[
226-
r#"{"config":{"generators":[{"name":"js","provider":{"fromEnvVar":null,"value":"prisma-client-js"},"output":null,"config":{},"binaryTargets":[],"previewFeatures":[],"sourceFilePath":"generator.prisma"}],"datasources":[{"name":"db","provider":"postgresql","activeProvider":"postgresql","url":{"fromEnvVar":null,"value":"postgresql://example.com/db"},"schemas":[],"sourceFilePath":"datasource.prisma"}],"warnings":[]},"errors":[]}"#
226+
r#"{"config":{"generators":[{"name":"js","provider":{"fromEnvVar":null,"value":"prisma-client-js"},"output":null,"config":{},"binaryTargets":[],"previewFeatures":[],"sourceFilePath":"generator.prisma"}],"datasources":[{"name":"db","provider":"postgresql","activeProvider":"postgresql","url":{"fromEnvVar":null,"value":"postgresql://example.com/db"},"namespaces":[],"sourceFilePath":"datasource.prisma"}],"warnings":[]},"errors":[]}"#
227227
]];
228228
let response = get_config(&request.to_string());
229229
expected.assert_eq(&response);
@@ -242,7 +242,7 @@ mod tests {
242242
"prismaSchema": schema,
243243
});
244244
let expected = expect![[
245-
r#"{"config":{"generators":[],"datasources":[{"name":"thedb","provider":"postgresql","activeProvider":"postgresql","url":{"fromEnvVar":"NON_EXISTING_ENV_VAR_WE_COUNT_ON_IT_AT_LEAST","value":null},"schemas":[],"sourceFilePath":"schema.prisma"}],"warnings":[]},"errors":[{"file_name":"schema.prisma","message":"\u001b[1;91merror\u001b[0m: \u001b[1mEnvironment variable not found: NON_EXISTING_ENV_VAR_WE_COUNT_ON_IT_AT_LEAST.\u001b[0m\n \u001b[1;94m-->\u001b[0m \u001b[4mschema.prisma:4\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;94m 3 | \u001b[0m provider = \"postgresql\"\n\u001b[1;94m 4 | \u001b[0m url = \u001b[1;91menv(\"NON_EXISTING_ENV_VAR_WE_COUNT_ON_IT_AT_LEAST\")\u001b[0m\n\u001b[1;94m | \u001b[0m\n"}]}"#
245+
r#"{"config":{"generators":[],"datasources":[{"name":"thedb","provider":"postgresql","activeProvider":"postgresql","url":{"fromEnvVar":"NON_EXISTING_ENV_VAR_WE_COUNT_ON_IT_AT_LEAST","value":null},"namespaces":[],"sourceFilePath":"schema.prisma"}],"warnings":[]},"errors":[{"file_name":"schema.prisma","message":"\u001b[1;91merror\u001b[0m: \u001b[1mEnvironment variable not found: NON_EXISTING_ENV_VAR_WE_COUNT_ON_IT_AT_LEAST.\u001b[0m\n \u001b[1;94m-->\u001b[0m \u001b[4mschema.prisma:4\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;94m 3 | \u001b[0m provider = \"postgresql\"\n\u001b[1;94m 4 | \u001b[0m url = \u001b[1;91menv(\"NON_EXISTING_ENV_VAR_WE_COUNT_ON_IT_AT_LEAST\")\u001b[0m\n\u001b[1;94m | \u001b[0m\n"}]}"#
246246
]];
247247
let response = get_config(&request.to_string());
248248
expected.assert_eq(&response);
@@ -262,7 +262,7 @@ mod tests {
262262
"ignoreEnvVarErrors": true,
263263
});
264264
let expected = expect![[
265-
r#"{"config":{"generators":[],"datasources":[{"name":"thedb","provider":"postgresql","activeProvider":"postgresql","url":{"fromEnvVar":"NON_EXISTING_ENV_VAR_WE_COUNT_ON_IT_AT_LEAST","value":null},"schemas":[],"sourceFilePath":"schema.prisma"}],"warnings":[]},"errors":[]}"#
265+
r#"{"config":{"generators":[],"datasources":[{"name":"thedb","provider":"postgresql","activeProvider":"postgresql","url":{"fromEnvVar":"NON_EXISTING_ENV_VAR_WE_COUNT_ON_IT_AT_LEAST","value":null},"namespaces":[],"sourceFilePath":"schema.prisma"}],"warnings":[]},"errors":[]}"#
266266
]];
267267
let response = get_config(&request.to_string());
268268
expected.assert_eq(&response);
@@ -284,7 +284,7 @@ mod tests {
284284
}
285285
});
286286
let expected = expect![[
287-
r#"{"config":{"generators":[],"datasources":[{"name":"thedb","provider":"postgresql","activeProvider":"postgresql","url":{"fromEnvVar":"DBURL","value":"postgresql://example.com/mydb"},"schemas":[],"sourceFilePath":"schema.prisma"}],"warnings":[]},"errors":[]}"#
287+
r#"{"config":{"generators":[],"datasources":[{"name":"thedb","provider":"postgresql","activeProvider":"postgresql","url":{"fromEnvVar":"DBURL","value":"postgresql://example.com/mydb"},"namespaces":[],"sourceFilePath":"schema.prisma"}],"warnings":[]},"errors":[]}"#
288288
]];
289289
let response = get_config(&request.to_string());
290290
expected.assert_eq(&response);
@@ -307,7 +307,7 @@ mod tests {
307307
}
308308
});
309309
let expected = expect![[
310-
r#"{"config":{"generators":[],"datasources":[{"name":"thedb","provider":"postgresql","activeProvider":"postgresql","url":{"fromEnvVar":"DBURL","value":"postgresql://example.com/mydb"},"directUrl":{"fromEnvVar":null,"value":"postgresql://example.com/direct"},"schemas":[],"sourceFilePath":"schema.prisma"}],"warnings":[]},"errors":[]}"#
310+
r#"{"config":{"generators":[],"datasources":[{"name":"thedb","provider":"postgresql","activeProvider":"postgresql","url":{"fromEnvVar":"DBURL","value":"postgresql://example.com/mydb"},"directUrl":{"fromEnvVar":null,"value":"postgresql://example.com/direct"},"namespaces":[],"sourceFilePath":"schema.prisma"}],"warnings":[]},"errors":[]}"#
311311
]];
312312
let response = get_config(&request.to_string());
313313
expected.assert_eq(&response);
@@ -331,7 +331,7 @@ mod tests {
331331
}
332332
});
333333
let expected = expect![[
334-
r#"{"config":{"generators":[],"datasources":[{"name":"thedb","provider":"postgresql","activeProvider":"postgresql","url":{"fromEnvVar":"DBURL","value":"postgresql://example.com/mydb"},"directUrl":{"fromEnvVar":"DBDIRURL","value":"postgresql://example.com/direct"},"schemas":[],"sourceFilePath":"schema.prisma"}],"warnings":[]},"errors":[]}"#
334+
r#"{"config":{"generators":[],"datasources":[{"name":"thedb","provider":"postgresql","activeProvider":"postgresql","url":{"fromEnvVar":"DBURL","value":"postgresql://example.com/mydb"},"directUrl":{"fromEnvVar":"DBDIRURL","value":"postgresql://example.com/direct"},"namespaces":[],"sourceFilePath":"schema.prisma"}],"warnings":[]},"errors":[]}"#
335335
]];
336336
let response = get_config(&request.to_string());
337337
expected.assert_eq(&response);
@@ -354,7 +354,7 @@ mod tests {
354354
}
355355
});
356356
let expected = expect![[
357-
r#"{"config":{"generators":[],"datasources":[{"name":"thedb","provider":"postgresql","activeProvider":"postgresql","url":{"fromEnvVar":"DBURL","value":null},"directUrl":{"fromEnvVar":null,"value":""},"schemas":[],"sourceFilePath":"schema.prisma"}],"warnings":[]},"errors":[{"file_name":"schema.prisma","message":"\u001b[1;91merror\u001b[0m: \u001b[1mError validating datasource `thedb`: You must provide a nonempty direct URL\u001b[0m\n \u001b[1;94m-->\u001b[0m \u001b[4mschema.prisma:5\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;94m 4 | \u001b[0m url = env(\"DBURL\")\n\u001b[1;94m 5 | \u001b[0m directUrl = \u001b[1;91m\"\"\u001b[0m\n\u001b[1;94m | \u001b[0m\n"}]}"#
357+
r#"{"config":{"generators":[],"datasources":[{"name":"thedb","provider":"postgresql","activeProvider":"postgresql","url":{"fromEnvVar":"DBURL","value":null},"directUrl":{"fromEnvVar":null,"value":""},"namespaces":[],"sourceFilePath":"schema.prisma"}],"warnings":[]},"errors":[{"file_name":"schema.prisma","message":"\u001b[1;91merror\u001b[0m: \u001b[1mError validating datasource `thedb`: You must provide a nonempty direct URL\u001b[0m\n \u001b[1;94m-->\u001b[0m \u001b[4mschema.prisma:5\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;94m 4 | \u001b[0m url = env(\"DBURL\")\n\u001b[1;94m 5 | \u001b[0m directUrl = \u001b[1;91m\"\"\u001b[0m\n\u001b[1;94m | \u001b[0m\n"}]}"#
358358
]];
359359
let response = get_config(&request.to_string());
360360
expected.assert_eq(&response);
@@ -377,7 +377,7 @@ mod tests {
377377
}
378378
});
379379
let expected = expect![[
380-
r#"{"config":{"generators":[],"datasources":[{"name":"thedb","provider":"postgresql","activeProvider":"postgresql","url":{"fromEnvVar":"DBURL","value":null},"directUrl":{"fromEnvVar":"DOES_NOT_EXIST","value":null},"schemas":[],"sourceFilePath":"schema.prisma"}],"warnings":[]},"errors":[{"file_name":"schema.prisma","message":"\u001b[1;91merror\u001b[0m: \u001b[1mEnvironment variable not found: DOES_NOT_EXIST.\u001b[0m\n \u001b[1;94m-->\u001b[0m \u001b[4mschema.prisma:5\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;94m 4 | \u001b[0m url = env(\"DBURL\")\n\u001b[1;94m 5 | \u001b[0m directUrl = \u001b[1;91menv(\"DOES_NOT_EXIST\")\u001b[0m\n\u001b[1;94m | \u001b[0m\n"}]}"#
380+
r#"{"config":{"generators":[],"datasources":[{"name":"thedb","provider":"postgresql","activeProvider":"postgresql","url":{"fromEnvVar":"DBURL","value":null},"directUrl":{"fromEnvVar":"DOES_NOT_EXIST","value":null},"namespaces":[],"sourceFilePath":"schema.prisma"}],"warnings":[]},"errors":[{"file_name":"schema.prisma","message":"\u001b[1;91merror\u001b[0m: \u001b[1mEnvironment variable not found: DOES_NOT_EXIST.\u001b[0m\n \u001b[1;94m-->\u001b[0m \u001b[4mschema.prisma:5\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;94m 4 | \u001b[0m url = env(\"DBURL\")\n\u001b[1;94m 5 | \u001b[0m directUrl = \u001b[1;91menv(\"DOES_NOT_EXIST\")\u001b[0m\n\u001b[1;94m | \u001b[0m\n"}]}"#
381381
]];
382382
let response = get_config(&request.to_string());
383383
expected.assert_eq(&response);
@@ -401,7 +401,7 @@ mod tests {
401401
}
402402
});
403403
let expected = expect![[
404-
r#"{"config":{"generators":[],"datasources":[{"name":"thedb","provider":"postgresql","activeProvider":"postgresql","url":{"fromEnvVar":"DBURL","value":null},"directUrl":{"fromEnvVar":"DOES_NOT_EXIST","value":null},"schemas":[],"sourceFilePath":"schema.prisma"}],"warnings":[]},"errors":[{"file_name":"schema.prisma","message":"\u001b[1;91merror\u001b[0m: \u001b[1mError validating datasource `thedb`: You must provide a nonempty direct URL. The environment variable `DOES_NOT_EXIST` resolved to an empty string.\u001b[0m\n \u001b[1;94m-->\u001b[0m \u001b[4mschema.prisma:5\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;94m 4 | \u001b[0m url = env(\"DBURL\")\n\u001b[1;94m 5 | \u001b[0m directUrl = \u001b[1;91menv(\"DOES_NOT_EXIST\")\u001b[0m\n\u001b[1;94m | \u001b[0m\n"}]}"#
404+
r#"{"config":{"generators":[],"datasources":[{"name":"thedb","provider":"postgresql","activeProvider":"postgresql","url":{"fromEnvVar":"DBURL","value":null},"directUrl":{"fromEnvVar":"DOES_NOT_EXIST","value":null},"namespaces":[],"sourceFilePath":"schema.prisma"}],"warnings":[]},"errors":[{"file_name":"schema.prisma","message":"\u001b[1;91merror\u001b[0m: \u001b[1mError validating datasource `thedb`: You must provide a nonempty direct URL. The environment variable `DOES_NOT_EXIST` resolved to an empty string.\u001b[0m\n \u001b[1;94m-->\u001b[0m \u001b[4mschema.prisma:5\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;94m 4 | \u001b[0m url = env(\"DBURL\")\n\u001b[1;94m 5 | \u001b[0m directUrl = \u001b[1;91menv(\"DOES_NOT_EXIST\")\u001b[0m\n\u001b[1;94m | \u001b[0m\n"}]}"#
405405
]];
406406
let response = get_config(&request.to_string());
407407
expected.assert_eq(&response);

prisma-fmt/src/text_document_completion.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use psl::{
1313
use crate::LSPContext;
1414

1515
mod datasource;
16-
mod multi_schema;
16+
mod multi_namespaces;
1717
mod referential_actions;
1818

1919
pub(super) type CompletionContext<'a> = LSPContext<'a, CompletionParams>;
@@ -210,7 +210,7 @@ fn push_namespaces(ctx: CompletionContext<'_>, completion_list: &mut CompletionL
210210
namespace.to_string()
211211
};
212212

213-
multi_schema::schema_namespace_completion(completion_list, namespace, insert_text);
213+
multi_namespaces::schema_namespace_completion(completion_list, namespace, insert_text);
214214
}
215215
}
216216

prisma-fmt/src/text_document_completion/multi_schema.rs renamed to prisma-fmt/src/text_document_completion/multi_namespaces.rs

File renamed without changes.

prisma-fmt/tests/code_actions/scenarios/multi_schema_add_to_existing_schemas/result.json renamed to prisma-fmt/tests/code_actions/scenarios/multi_namespaces_add_to_existing_schemas/result.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
[
22
{
3-
"title": "Add schema to schemas",
3+
"title": "Add namespace to namespaces",
44
"kind": "quickfix",
55
"diagnostics": [
66
{
77
"range": {
88
"start": {
99
"line": 15,
10-
"character": 13
10+
"character": 16
1111
},
1212
"end": {
1313
"line": 15,
14-
"character": 19
14+
"character": 22
1515
}
1616
},
1717
"severity": 1,
18-
"message": "This schema is not defined in the datasource. Read more on `@@schema` at https://pris.ly/d/multi-schema"
18+
"message": "This namespace is not defined in the datasource. Read more on `@@namespace` at https://pris.ly/d/multi-schema"
1919
}
2020
],
2121
"edit": {

prisma-fmt/tests/code_actions/scenarios/multi_schema_add_to_existing_schemas/schema.prisma renamed to prisma-fmt/tests/code_actions/scenarios/multi_namespaces_add_to_existing_schemas/schema.prisma

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ generator client {
66
datasource db {
77
provider = "postgresql"
88
url = env("DATABASE_URL")
9-
schemas = ["a", "b"]
9+
namespaces = ["a", "b"]
1010
relationMode = "prisma"
1111
}
1212

1313
model A {
1414
id Int @id
1515
16-
@@schema("base")
16+
@@namespace("base")
1717
}

prisma-fmt/tests/code_actions/scenarios/multi_schema_add_to_existing_schemas_multifile/_target.prisma renamed to prisma-fmt/tests/code_actions/scenarios/multi_namespaces_add_to_existing_schemas_multifile/_target.prisma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
model A {
22
id Int @id
33
4-
@@schema("base")
4+
@@namespace("base")
55
}

prisma-fmt/tests/code_actions/scenarios/multi_schema_add_to_existing_schemas_multifile/datasource.prisma renamed to prisma-fmt/tests/code_actions/scenarios/multi_namespaces_add_to_existing_schemas_multifile/datasource.prisma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
datasource db {
22
provider = "postgresql"
33
url = env("DATABASE_URL")
4-
schemas = ["a", "b"]
4+
namespaces = ["a", "b"]
55
relationMode = "prisma"
66
}

prisma-fmt/tests/code_actions/scenarios/multi_schema_add_to_existing_schemas_multifile/generator.prisma renamed to prisma-fmt/tests/code_actions/scenarios/multi_namespaces_add_to_existing_schemas_multifile/generator.prisma

File renamed without changes.

0 commit comments

Comments
 (0)