I have problem with strapi:
I have table ‘test’, previously in this table i store 2 fields: ‘name’, ‘price’
But then i removed this fields and added only: ‘type’
And write migration to fill this table:
async function up() {
await strapi.db.transaction(async () => {
await strapi.db.query(‘api::amenity.amenity’).createMany({
data: amenitiesList.map((amenity) => ({ type: amenity })),
});
});
}
module.exports = { up };
But now i have problem, migration to fill starts before main migration (content-types), and then i have error:
column “type” of relation “amenities” does not exist
This topic has been created from a Discord post (1268547861696483380) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord