I was trying to run a migration file to create a table of users but I kept getting the following error:
Error: Not run migration 1604169742656_add-users-table is preceding already run migration 1604024614269_table-comments
I worked around it by creating a new database as I was pressed for time, but does anyone know what the interpretation of this error is? Did I need to first perform a drop of the current table?
This is the migration I was trying to run:
exports.up = pgm => {
pgm.sql(`
CREATE TABLE users (
id SERIAL PRIMARY KEY,
created_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
bio VARCHAR(400),
username VARCHAR(30) NOT NULL
);
`);
};