Compare commits
4 Commits
2f7276a6c6
...
0e2c5f8318
| Author | SHA1 | Date | |
|---|---|---|---|
| 0e2c5f8318 | |||
| 6811dc461c | |||
| 6f11bdb01d | |||
| dd440a4e75 |
53
api/migrations/20260204025935-remove-unused-tables.js
Normal file
53
api/migrations/20260204025935-remove-unused-tables.js
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
var dbm;
|
||||||
|
var type;
|
||||||
|
var seed;
|
||||||
|
var fs = require('fs');
|
||||||
|
var path = require('path');
|
||||||
|
var Promise;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* We receive the dbmigrate dependency from dbmigrate initially.
|
||||||
|
* This enables us to not have to rely on NODE_PATH.
|
||||||
|
*/
|
||||||
|
exports.setup = function(options, seedLink) {
|
||||||
|
dbm = options.dbmigrate;
|
||||||
|
type = dbm.dataType;
|
||||||
|
seed = seedLink;
|
||||||
|
Promise = options.Promise;
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.up = function(db) {
|
||||||
|
var filePath = path.join(__dirname, 'sqls', '20260204025935-remove-unused-tables-up.sql');
|
||||||
|
return new Promise( function( resolve, reject ) {
|
||||||
|
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
||||||
|
if (err) return reject(err);
|
||||||
|
console.log('received data: ' + data);
|
||||||
|
|
||||||
|
resolve(data);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.then(function(data) {
|
||||||
|
return db.runSql(data);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.down = function(db) {
|
||||||
|
var filePath = path.join(__dirname, 'sqls', '20260204025935-remove-unused-tables-down.sql');
|
||||||
|
return new Promise( function( resolve, reject ) {
|
||||||
|
fs.readFile(filePath, {encoding: 'utf-8'}, function(err,data){
|
||||||
|
if (err) return reject(err);
|
||||||
|
console.log('received data: ' + data);
|
||||||
|
|
||||||
|
resolve(data);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.then(function(data) {
|
||||||
|
return db.runSql(data);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
exports._meta = {
|
||||||
|
"version": 1
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/* Replace with your SQL commands */
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
/* Replace with your SQL commands */
|
||||||
|
|
||||||
|
DROP TABLE 'mission_attendee_roles';
|
||||||
|
DROP TABLE 'mission_event_attendees';
|
||||||
|
DROP TABLE 'mission_events';
|
||||||
|
|
||||||
|
DROP PROCEDURE 'sp_update_member_rank_Backup_1-27-2026';
|
||||||
|
DROP PROCEDURE 'sp_update_member_status_Backup_1-27-2026';
|
||||||
|
DROP PROCEDURE 'sp_update_member_unit_Backup_1-27-2026';
|
||||||
Reference in New Issue
Block a user