Skip to content

Commit 0aaaf88

Browse files
committed
test(e2e): temporary disable dev migration test
1 parent 8c71fbe commit 0aaaf88

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

meta-cli/src/deploy/actors/console/input.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,19 @@ impl Select {
6464
) -> Result<usize> {
6565
let mut retry_left = self.max_retry_count;
6666

67-
eprintln!("{} {}", "[select]".yellow(), self.prompt);
67+
self.console
68+
.error(format!("{} {}", "[select]".yellow(), self.prompt));
6869
for (i, option) in options.iter().enumerate() {
6970
let label = option.label();
70-
eprintln!("{}) {}", i + 1, label.primary);
71+
self.console.error(format!("{}) {}", i + 1, label.primary));
7172
if let Some(secondary_label) = label.secondary {
72-
eprintln!(" {}", secondary_label.dimmed());
73+
self.console
74+
.error(format!(" {}", secondary_label.dimmed()));
7375
}
7476
}
7577

7678
loop {
77-
eprint!("(1-{})> ", options.len());
79+
self.console.error(format!("(1-{})> ", options.len()));
7880

7981
let input = self.console.read_line().await;
8082

meta-cli/src/deploy/push/migration_resolution.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use anyhow::Result;
88
use colored::Colorize;
99

1010
use crate::{
11-
com::{responses::SDKResponse, store::ServerStore},
11+
com::store::ServerStore,
1212
deploy::actors::{
1313
console::{
1414
input::{ConfirmHandler, OptionLabel, SelectOption},
@@ -22,13 +22,13 @@ use crate::{
2222

2323
#[derive(Debug)]
2424
pub struct ConfirmDatabaseResetRequired {
25-
pub sdk_response: SDKResponse,
25+
pub typegraph_path: PathBuf,
2626
pub loader: Addr<LoaderActor>,
2727
}
2828

2929
impl ConfirmHandler for ConfirmDatabaseResetRequired {
3030
fn on_confirm(&self) {
31-
let tg_path = self.sdk_response.clone().typegraph_path;
31+
let tg_path = self.typegraph_path.clone();
3232

3333
// reset
3434
let mut option = ServerStore::get_migration_action(&tg_path);

meta-cli/src/deploy/push/pusher.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ impl PushResult {
195195
self.loader.clone(),
196196
failure,
197197
self.sdk_response.clone(),
198+
migdir.clone(),
198199
)
199200
.await?
200201
}
@@ -233,7 +234,7 @@ async fn handle_database_reset(
233234
format!("Do you want to reset the database for runtime {rt} on {name}?"),
234235
)
235236
.interact(Box::new(ConfirmDatabaseResetRequired {
236-
sdk_response: sdk_response.clone(),
237+
typegraph_path: sdk_response.typegraph_path,
237238
loader,
238239
}))
239240
.await?;
@@ -248,6 +249,7 @@ pub async fn handle_null_constraint_violation(
248249
loader: Addr<LoaderActor>,
249250
failure: NullConstraintViolation,
250251
sdk_response: SDKResponse,
252+
migration_dir: PathBuf,
251253
) -> Result<()> {
252254
#[allow(unused)]
253255
let typegraph_name = sdk_response.typegraph_name;
@@ -265,10 +267,6 @@ pub async fn handle_null_constraint_violation(
265267

266268
if is_new_column {
267269
console.info(format!("manually edit the migration {migration_name}; or remove the migration and add set a default value"));
268-
let migration_dir = ServerStore::get_config()
269-
.unwrap()
270-
.prisma_migrations_dir_rel(&typegraph_name)
271-
.join(&runtime_name);
272270

273271
let remove_latest = RemoveLatestMigration {
274272
loader: loader.clone(),

0 commit comments

Comments
 (0)