Open BrandyMello opened 4 years ago
This issue has gotten large. Learned to open an issue immediately to take step by step notes on what was attempted and the results so I do not lose track of what has been done.
Your branch is up to date with 'origin/master'.
brandyamello~/Mod4/projects/byob[master] heroku run 'knex seed:run'
Running knex seed:run on ⬢ byob-bmello... up, run.5192 (Free)
Using environment: production
Error seeding error: delete from "dependencies_or_territories" - relation "dependencies_or_territories" does not exist
Ran 1 seed files
brandyamello~/Mod4/projects/byob[master] heroku run 'knex migrate:latest'
Running knex migrate:latest on ⬢ byob-bmello... up, run.1827 (Free)
Using environment: production
migration file "20191003120414_update-drop-population-column-territories-table.js" failed
migration failed with error: alter table "dependencies_or_territories" add column "territory_population" integer - column "territory_population" of relation "dependencies_or_territories" already exists
error: column "territory_population" of relation "dependencies_or_territories" already exists
at Connection.parseE (/app/node_modules/pg/lib/connection.js:604:11)
at Connection.parseMessage (/app/node_modules/pg/lib/connection.js:401:19)
at TLSSocket.
brandyamello~/Mod4/projects/byob[master] knex migrate:up
Using environment: development
migration file "20191003120414_update-drop-population-column-territories-table.js" failed
migration failed with error: alter table "dependencies_or_territories" add column "territory_population" integer - column "territory_population" of relation "dependencies_or_territories" already exists
error: column "territory_population" of relation "dependencies_or_territories" already exists
at Connection.parseE (/Users/brandyamello/Mod4/projects/byob/node_modules/pg/lib/connection.js:604:11)
at Connection.parseMessage (/Users/brandyamello/Mod4/projects/byob/node_modules/pg/lib/connection.js:401:19)
at Socket.
brandyamello~/Mod4/projects/byob[master] knex migrate:down
Using environment: development
migration file "20191003115715_drop-population-column-replace.js" failed
migration failed with error: alter table "dependencies_or_territories" add column "population" varchar(255) - column "population" of relation "dependencies_or_territories" already exists
error: column "population" of relation "dependencies_or_territories" already exists
at Connection.parseE (/Users/brandyamello/Mod4/projects/byob/node_modules/pg/lib/connection.js:604:11)
at Connection.parseMessage (/Users/brandyamello/Mod4/projects/byob/node_modules/pg/lib/connection.js:401:19)
at Socket.
brandyamello~/Mod4/projects/byob[master] knex migrate:latest
Using environment: development
migration file "20191003120414_update-drop-population-column-territories-table.js" failed
migration failed with error: alter table "dependencies_or_territories" add column "territory_population" integer - column "territory_population" of relation "dependencies_or_territories" already exists
error: column "territory_population" of relation "dependencies_or_territories" already exists
at Connection.parseE (/Users/brandyamello/Mod4/projects/byob/node_modules/pg/lib/connection.js:604:11)
at Connection.parseMessage (/Users/brandyamello/Mod4/projects/byob/node_modules/pg/lib/connection.js:401:19)
at Socket.
Options: -V, --version output the version number --debug Run with debugging. --knexfile [path] Specify the knexfile path. --knexpath [path] Specify the path to knex instance. --cwd [path] Specify the working directory. --client [name] Set DB client without a knexfile. --connection [address] Set DB connection without a knexfile. --migrations-directory [path] Set migrations directory without a knexfile. --migrations-table-name [path] Set migrations table name without a knexfile. --env [name] environment, default: process.env.NODE_ENV || development -h, --help output usage information
Commands:
init [options] Create a fresh knexfile.
migrate:make [options]
I created a migration to correct an error I had in the prior migration. When attempting to deploy, I repeatedly got an error saying that the table already existed. I rolled back once. I could not migrate to the latest. Got an error saying that the rolled back migration failed. I removed the migration via command line. Still would not get passed the migration. Now my table has an additional unnecessary row and I am unable to post to that table.