Esempio n. 1
0
        public static void Upgrade()
        {
            List <string> tables        = Database.Backend.AllTables();
            List <string> blockDBTables = new List <string>(tables.Count);

            current = 0; count = 0;

            foreach (string table in tables)
            {
                if (!table.CaselessStarts("block"))
                {
                    continue;
                }
                blockDBTables.Add(table);
            }

            current = 0;
            count   = blockDBTables.Count;
            Server.s.Log("Upgrading " + count + " tables. this may take several hours..");

            BlockDBTableDumper dumper = new BlockDBTableDumper();

            foreach (string table in blockDBTables)
            {
                current++;
                try {
                    dumper.DumpTable(table);
                } catch (Exception ex) {
                    Server.ErrorLog(ex);
                }
            }
        }
Esempio n. 2
0
        public static void Upgrade()
        {
            List <string> tables        = Database.Backend.AllTables();
            List <string> blockDBTables = new List <string>(tables.Count);

            current = 0; count = 0;

            foreach (string table in tables)
            {
                if (!table.CaselessStarts("block"))
                {
                    continue;
                }
                blockDBTables.Add(table);
            }

            current = 0;
            count   = blockDBTables.Count;
            Logger.Log(LogType.SystemActivity, "Upgrading {0} tables. This may take several hours.", count);

            BlockDBTableDumper dumper = new BlockDBTableDumper();

            foreach (string table in blockDBTables)
            {
                current++;
                try {
                    dumper.DumpTable(table);
                } catch (Exception ex) {
                    Logger.LogError(ex);
                }
            }
        }