Sample Header Ad - 728x90

Error: Not run migration 1604169742656_add-users-table is preceding already run migration 1604024614269_table-comments

1 vote
1 answer
1054 views
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 ); `); };
Asked by Daniel (281 rep)
Oct 31, 2020, 06:53 PM
Last activity: Sep 20, 2021, 02:58 PM