Cleaned up unused tables

This commit is contained in:
2026-02-03 22:27:02 -05:00
parent 3a5f9eb6f0
commit dd440a4e75
3 changed files with 63 additions and 0 deletions

View 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
};

View File

@@ -0,0 +1 @@
/* Replace with your SQL commands */

View File

@@ -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';