<commit_before>'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    let transaction = await queryInterface.sequelize.transaction();
    try {
      let schema = await queryInterface.showAllSchemas();
      let tables = [];
      schema.forEach(x => {tables.push(x.Tables_in_fedlearner)});

      console.log("Existing tables:", tables);<commit_msg>Fix get tables error in migration (#408)<commit_after>'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    let transaction = await queryInterface.sequelize.transaction();
    try {
      let schema = await queryInterface.showAllSchemas();
      console.log('DB schema:', schema);

      let tables = [];
      schema.forEach(x => { for (var key in x) tables.push(x[key]) });

      console.log("Existing tables:", tables);
{'fraction_non_alphanumeric': 0.14216867469879518, 'fraction_numerical': 0.0036144578313253013, 'mean_word_length': 3.721590909090909, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7658541', 'n_tokens_mistral': 244, 'n_tokens_neox': 236, 'n_words': 59}