mirror of
https://github.com/qwertyforce/scenery.git
synced 2025-05-31 11:42:35 +00:00
17 lines
434 B
Plaintext
17 lines
434 B
Plaintext
import db_ops from './helpers/db_ops'
|
|
|
|
async function change_schema() {
|
|
const images = await db_ops.image_ops.get_all_images();
|
|
for (const image of images) {
|
|
const new_image=JSON.parse(JSON.stringify(image))
|
|
|
|
await db_ops.image_ops.delete_image_by_id(image.id)
|
|
await db_ops.image_ops.add_image_by_object(new_image)
|
|
}
|
|
}
|
|
async function run(){
|
|
await change_schema()
|
|
process.exit()
|
|
}
|
|
run()
|