-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #540 from Open-Earth-Foundation/fix/emissions-fact…
…or-seed fix(seed): emissions factor seed script and files
- Loading branch information
Showing
12 changed files
with
63,147 additions
and
103,840 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
app/migrations/20240627123051-EmissionsFactor-add-columns.cjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
'use strict'; | ||
|
||
const columns = ["actor_id", "methodology_name"]; | ||
|
||
/** @type {import('sequelize-cli').Migration} */ | ||
module.exports = { | ||
async up(queryInterface, Sequelize) { | ||
return queryInterface.sequelize.transaction(async (transaction) => { | ||
for (const column of columns) { | ||
await queryInterface.addColumn("EmissionsFactor", column, Sequelize.TEXT, { transaction }); | ||
} | ||
}); | ||
}, | ||
|
||
async down(queryInterface) { | ||
return queryInterface.sequelize.transaction(async (transaction) => { | ||
for (const column of columns) { | ||
await queryInterface.removeColumn("EmissionsFactor", column, { transaction }); | ||
} | ||
}); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104,564 changes: 52,282 additions & 52,282 deletions
104,564
app/seed-data/emissions_factors/data_processed/CarbonFootPrint_2023/EmissionsFactor.csv
Large diffs are not rendered by default.
Oops, something went wrong.
20,600 changes: 10,246 additions & 10,354 deletions
20,600
app/seed-data/emissions_factors/data_processed/EFDB_2006_IPCC_guidelines/EmissionsFactor.csv
Large diffs are not rendered by default.
Oops, something went wrong.
20,392 changes: 0 additions & 20,392 deletions
20,392
...ns_factors/data_processed/EFDB_2006_IPCC_guidelines/EmissionsFactor_Stationary_Energy.csv
This file was deleted.
Oops, something went wrong.
20,392 changes: 0 additions & 20,392 deletions
20,392
...ors/data_processed/EFDB_2006_IPCC_guidelines/EmissionsFactor_Stationary_Energy_Scope1.csv
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.