!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-163-generic #173-Ubuntu SMP Tue Oct 14 17:51:00 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/note.picotech.app/public_html/node_modules/sequelize-cli/lib/commands/   drwxr-xr-x
Free 23.7 GB of 117.98 GB (20.09%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     migrate.js (3.46 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
"use strict";

var _process = _interopRequireDefault(require("process"));
var _yargs = require("../core/yargs");
var _migrator = require("../core/migrator");
var _helpers = _interopRequireDefault(require("../helpers"));
var _lodash = _interopRequireDefault(require("lodash"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
exports.builder = yargs => (0, _yargs._baseOptions)(yargs).option('to', {
  describe: 'Migration name to run migrations until',
  type: 'string'
}).option('from', {
  describe: 'Migration name to start migrations from (excluding)',
  type: 'string'
}).option('name', {
  describe: 'Migration name. When specified, only this migration will be run. Mutually exclusive with --to and --from',
  type: 'string',
  conflicts: ['to', 'from']
}).argv;
exports.handler = async function (args) {
  const command = args._[0];

  // legacy, gulp used to do this
  await _helpers.default.config.init();
  switch (command) {
    case 'db:migrate':
      await migrate(args);
      break;
    case 'db:migrate:schema:timestamps:add':
      await migrateSchemaTimestampAdd(args);
      break;
    case 'db:migrate:status':
      await migrationStatus(args);
      break;
  }
  _process.default.exit(0);
};
function migrate(args) {
  return (0, _migrator.getMigrator)('migration', args).then(migrator => {
    return (0, _migrator.ensureCurrentMetaSchema)(migrator).then(() => migrator.pending()).then(migrations => {
      const options = {};
      if (migrations.length === 0) {
        _helpers.default.view.log('No migrations were executed, database schema was already up to date.');
        _process.default.exit(0);
      }
      if (args.to) {
        if (migrations.filter(migration => migration.file === args.to).length === 0) {
          _helpers.default.view.log('No migrations were executed, database schema was already up to date.');
          _process.default.exit(0);
        }
        options.to = args.to;
      }
      if (args.from) {
        if (migrations.map(migration => migration.file).lastIndexOf(args.from) === -1) {
          _helpers.default.view.log('No migrations were executed, database schema was already up to date.');
          _process.default.exit(0);
        }
        options.from = args.from;
      }
      return options;
    }).then(options => {
      if (args.name) {
        return migrator.up(args.name);
      } else {
        return migrator.up(options);
      }
    });
  }).catch(e => _helpers.default.view.error(e));
}
function migrationStatus(args) {
  return (0, _migrator.getMigrator)('migration', args).then(migrator => {
    return (0, _migrator.ensureCurrentMetaSchema)(migrator).then(() => migrator.executed()).then(migrations => {
      _lodash.default.forEach(migrations, migration => {
        _helpers.default.view.log('up', migration.file);
      });
    }).then(() => migrator.pending()).then(migrations => {
      _lodash.default.forEach(migrations, migration => {
        _helpers.default.view.log('down', migration.file);
      });
    });
  }).catch(e => _helpers.default.view.error(e));
}
function migrateSchemaTimestampAdd(args) {
  return (0, _migrator.getMigrator)('migration', args).then(migrator => {
    return (0, _migrator.addTimestampsToSchema)(migrator).then(items => {
      if (items) {
        _helpers.default.view.log('Successfully added timestamps to MetaTable.');
      } else {
        _helpers.default.view.log('MetaTable already has timestamps.');
      }
    });
  }).catch(e => _helpers.default.view.error(e));
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0034 ]--