0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

[ci] format

This commit is contained in:
Matthew Phillips 2024-04-08 13:22:48 +00:00 committed by astrobot-houston
parent 28e7535e5c
commit 4e7f5f8951
2 changed files with 13 additions and 12 deletions

View file

@ -1,4 +1,5 @@
import type { AstroConfig } from 'astro';
import prompts from 'prompts';
import type { Arguments } from 'yargs-parser';
import { safeFetch } from '../../../../runtime/utils.js';
import { MIGRATION_VERSION } from '../../../consts.js';
@ -12,7 +13,6 @@ import {
getMigrationQueries,
getProductionCurrentSnapshot,
} from '../../migration-queries.js';
import prompts from 'prompts';
export async function cmd({
dbConfig,
@ -42,17 +42,17 @@ export async function cmd({
}
if (isForceReset) {
const { begin } = await prompts({
type: "confirm",
name: "begin",
message: `Reset your database? All of your data will be erased and your schema created from scratch.`,
initial: false
});
const { begin } = await prompts({
type: 'confirm',
name: 'begin',
message: `Reset your database? All of your data will be erased and your schema created from scratch.`,
initial: false,
});
if(!begin) {
console.log("Canceled.");
process.exit(0);
}
if (!begin) {
console.log('Canceled.');
process.exit(0);
}
console.log(`Force-pushing to the database. All existing data will be erased.`);
} else if (confirmations.length > 0) {

View file

@ -16,7 +16,8 @@ export const MISSING_EXECUTE_PATH_ERROR = `${red(
export const RENAME_TABLE_ERROR = (oldTable: string, newTable: string) => {
return (
red("\u25B6 Potential table rename detected: " + oldTable + " -> " + newTable) + `
red('\u25B6 Potential table rename detected: ' + oldTable + ' -> ' + newTable) +
`
You cannot add and remove tables in the same schema update batch.
1. Use "deprecated: true" to deprecate a table before renaming.