diff --git a/LibreNMS/DB/Schema.php b/LibreNMS/DB/Schema.php index 9f3997a643..be0d2e3ae3 100644 --- a/LibreNMS/DB/Schema.php +++ b/LibreNMS/DB/Schema.php @@ -29,7 +29,6 @@ use Illuminate\Support\Facades\DB; use Illuminate\Support\Str; use LibreNMS\Config; use LibreNMS\Util\Version; -use PDOException; use Schema as LaravelSchema; use Symfony\Component\Yaml\Yaml; @@ -113,25 +112,6 @@ class Schema return $this->schema; } - /** - * Get the schema version from the previous schema system - */ - public static function getLegacySchema(): int - { - try { - $db = \LibreNMS\DB\Eloquent::DB(); - if ($db) { - return (int) $db->table('dbSchema') - ->orderBy('version', 'DESC') - ->value('version'); - } - } catch (PDOException $e) { - // return default - } - - return 0; - } - /** * Get a list of all tables. * diff --git a/LibreNMS/Validations/Database/CheckDatabaseSchemaVersion.php b/LibreNMS/Validations/Database/CheckDatabaseSchemaVersion.php index 213010fd20..4ea8b43ed2 100644 --- a/LibreNMS/Validations/Database/CheckDatabaseSchemaVersion.php +++ b/LibreNMS/Validations/Database/CheckDatabaseSchemaVersion.php @@ -42,28 +42,15 @@ class CheckDatabaseSchemaVersion implements Validation, ValidationFixer public function validate(): ValidationResult { self::$current = false; - $current = \LibreNMS\DB\Schema::getLegacySchema(); - $latest = 1000; - if ($current === 0 || $current === $latest) { - // Using Laravel migrations - if (! Schema::isCurrent()) { - return ValidationResult::fail(trans('validation.validations.database.CheckSchemaVersion.fail_outdated'), './lnms migrate') - ->setFixer(__CLASS__); - } + if (! Schema::isCurrent()) { + return ValidationResult::fail(trans('validation.validations.database.CheckSchemaVersion.fail_outdated'), './lnms migrate') + ->setFixer(__CLASS__); + } - $migrations = Schema::getUnexpectedMigrations(); - if ($migrations->isNotEmpty()) { - return ValidationResult::warn(trans('validation.validations.database.CheckSchemaVersion.warn_extra_migrations', ['migrations' => $migrations->implode(', ')])); - } - } elseif ($current < $latest) { - return ValidationResult::fail( - trans('validation.validations.database.CheckSchemaVersion.fail_legacy_outdated', ['current' => $current, 'latest' => $latest]), - trans('validation.validations.database.CheckSchemaVersion.fix_legacy_outdated'), - ); - } else { - // latest > current - return ValidationResult::warn(trans('validation.validations.database.CheckSchemaVersion.warn_legacy_newer')); + $migrations = Schema::getUnexpectedMigrations(); + if ($migrations->isNotEmpty()) { + return ValidationResult::warn(trans('validation.validations.database.CheckSchemaVersion.warn_extra_migrations', ['migrations' => $migrations->implode(', ')])); } self::$current = true; @@ -90,6 +77,6 @@ class CheckDatabaseSchemaVersion implements Validation, ValidationFixer public function fix(): bool { - return \Artisan::call('migrate', ['--force' => true]) === 0; + return \Artisan::call('migrate', ['--force' => true, '--isolated' => true]) === 0; } } diff --git a/LibreNMS/Validations/Database/CheckSchemaCollation.php b/LibreNMS/Validations/Database/CheckSchemaCollation.php index 41f868786c..e6931fbd47 100644 --- a/LibreNMS/Validations/Database/CheckSchemaCollation.php +++ b/LibreNMS/Validations/Database/CheckSchemaCollation.php @@ -93,7 +93,7 @@ class CheckSchemaCollation implements Validation, ValidationFixer public function fix(): bool { \DB::table('migrations')->where('migration', '2021_02_09_122930_migrate_to_utf8mb4')->delete(); - $res = \Artisan::call('migrate', ['--force' => true]); + $res = \Artisan::call('migrate', ['--force' => true, '--isolated' => true]); return $res === 0; } diff --git a/daily.sh b/daily.sh index 4503e0a83e..13a54e519c 100755 --- a/daily.sh +++ b/daily.sh @@ -339,7 +339,7 @@ main () { no-code-update) # Updates of the code are disabled, just check for schema updates # and clean up the db. - status_run 'Updating SQL-Schema' 'php includes/sql-schema/update.php' + status_run 'Updating SQL-Schema' './lnms migrate --force --no-interaction --isolated' status_run 'Cleaning up DB' "'$DAILY_SCRIPT' cleanup" status_run 'Updating Mac OUI data' "$DAILY_SCRIPT mac_oui" ;; @@ -366,7 +366,7 @@ main () { fi # List all tasks to do after pull in the order of execution - status_run 'Updating SQL-Schema' 'php includes/sql-schema/update.php' + status_run 'Updating SQL-Schema' './lnms migrate --force --no-interaction --isolated' status_run 'Updating submodules' "$DAILY_SCRIPT submodules" status_run 'Cleaning up DB' "$DAILY_SCRIPT cleanup" status_run 'Fetching notifications' "$DAILY_SCRIPT notifications" diff --git a/database/migrations/2023_08_02_090027_drop_dbschema_table.php b/database/migrations/2023_08_02_090027_drop_dbschema_table.php new file mode 100644 index 0000000000..c9692f96f9 --- /dev/null +++ b/database/migrations/2023_08_02_090027_drop_dbschema_table.php @@ -0,0 +1,43 @@ +first()->version != 1000) { + $error = 'Unsupported upgrade path! You need to update to version 23.7.0 first!'; + Log::error($error); + exit($error); + } + } + + Schema::dropIfExists('dbSchema'); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down(): void + { + Schema::create('dbSchema', function (Blueprint $table) { + $table->integer('version')->default(0)->primary(); + }); + + if (! DB::table('dbSchema')->exists()) { + DB::table('dbSchema')->insert(['version' => 1000]); + } + } +}; diff --git a/database/schema/mysql-schema.dump b/database/schema/mysql-schema.dump index 33f936c7a5..9200002d91 100644 --- a/database/schema/mysql-schema.dump +++ b/database/schema/mysql-schema.dump @@ -607,14 +607,6 @@ CREATE TABLE `dashboards` ( PRIMARY KEY (`dashboard_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `dbSchema`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `dbSchema` ( - `version` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`version`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `device_graphs`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; diff --git a/database/schema/testing-schema.dump b/database/schema/testing-schema.dump index 33f936c7a5..9200002d91 100644 --- a/database/schema/testing-schema.dump +++ b/database/schema/testing-schema.dump @@ -607,14 +607,6 @@ CREATE TABLE `dashboards` ( PRIMARY KEY (`dashboard_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `dbSchema`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `dbSchema` ( - `version` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`version`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `device_graphs`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; diff --git a/database/seeders/DatabaseSeeder.php b/database/seeders/DatabaseSeeder.php index 19058eea07..a125f96b55 100644 --- a/database/seeders/DatabaseSeeder.php +++ b/database/seeders/DatabaseSeeder.php @@ -14,7 +14,6 @@ class DatabaseSeeder extends Seeder public function run(): void { $this->call(DefaultAlertTemplateSeeder::class); - $this->call(DefaultLegacySchemaSeeder::class); $this->call(ConfigSeeder::class); } } diff --git a/database/seeders/DefaultLegacySchemaSeeder.php b/database/seeders/DefaultLegacySchemaSeeder.php deleted file mode 100644 index bd6d3767f6..0000000000 --- a/database/seeders/DefaultLegacySchemaSeeder.php +++ /dev/null @@ -1,46 +0,0 @@ -. - * - * @link https://www.librenms.org - * - * @copyright 2018 Tony Murray - * @author Tony Murray - */ - -namespace Database\Seeders; - -use Illuminate\Database\Seeder; -use Illuminate\Support\Facades\DB; - -class DefaultLegacySchemaSeeder extends Seeder -{ - /** - * Run the database seeds. - * - * @return void - */ - public function run(): void - { - // insert version 1000 to prevent legacy schema code from running. - // additionally prevents seeder from being run again by includes/sql-schema/update.php. - if (! DB::table('dbSchema')->exists()) { - DB::table('dbSchema')->insert(['version' => 1000]); - } - } -} diff --git a/database/testing.sqlite b/database/testing.sqlite new file mode 100644 index 0000000000..e21f731cd9 Binary files /dev/null and b/database/testing.sqlite differ diff --git a/doc/General/Updating.md b/doc/General/Updating.md index badcf9618a..28bf296c8a 100644 --- a/doc/General/Updating.md +++ b/doc/General/Updating.md @@ -22,7 +22,7 @@ you can do so by running the following commands: cd /opt/librenms git pull ./scripts/composer_wrapper.php install --no-dev -php includes/sql-schema/update.php +./lnms migrate ./validate.php ``` diff --git a/doc/Installation/Installation-CentOS-6-Apache-Nginx.md b/doc/Installation/Installation-CentOS-6-Apache-Nginx.md index 83c70994be..5afd6ee2fe 100644 --- a/doc/Installation/Installation-CentOS-6-Apache-Nginx.md +++ b/doc/Installation/Installation-CentOS-6-Apache-Nginx.md @@ -367,7 +367,7 @@ indicate otherwise! Initiate the follow database with the following command: ``` -php includes/sql-schema/update.php +./lnms migrate ``` # Create admin user diff --git a/includes/functions.php b/includes/functions.php index 5148668a39..1d266a01c0 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -1329,29 +1329,6 @@ function cache_peeringdb() } } -/** - * Get an array of the schema files. - * schema_version => full_file_name - * - * @return mixed - */ -function get_schema_list() -{ - // glob returns an array sorted by filename - $files = glob(Config::get('install_dir') . '/sql-schema/*.sql'); - - // set the keys to the db schema version - $files = array_reduce($files, function ($array, $file) { - $array[(int) basename($file, '.sql')] = $file; - - return $array; - }, []); - - ksort($files); // fix dbSchema 1000 order - - return $files; -} - /** * @param $device * @return int|null diff --git a/includes/sql-schema/update.php b/includes/sql-schema/update.php deleted file mode 100644 index 4b8a5ee192..0000000000 --- a/includes/sql-schema/update.php +++ /dev/null @@ -1,103 +0,0 @@ -. - * - * Copyright (C) 2006-2012, Observium Developers - http://www.observium.org - * - * @link https://www.librenms.org - * - * @copyright 2017-2018 Tony Murray - * @author Tony Murray - */ -if (! isset($init_modules) && php_sapi_name() == 'cli') { - // Not called from within discovery, let's load up the necessary stuff. - $init_modules = []; - require realpath(__DIR__ . '/../..') . '/includes/init.php'; -} - -$return = 0; - -// make sure the cache_locks table exists before attempting to use a db lock -if (config('cache.default') == 'database' && ! \Schema::hasTable('cache_locks')) { - $skip_schema_lock = true; -} - -$schemaLock = Cache::lock('schema', 86000); -if (! empty($skip_schema_lock) || $schemaLock->get()) { - $db_rev = \LibreNMS\DB\Schema::getLegacySchema(); - - $migrate_opts = ['--force' => true, '--ansi' => true]; - - if ($db_rev === 0) { - $migrate_opts['--seed'] = true; - $return = Artisan::call('migrate', $migrate_opts); - echo Artisan::output(); - } elseif ($db_rev < 1000) { - // legacy update - d_echo("DB Schema update started....\n"); - - // Set Database Character set and Collation - dbQuery('ALTER DATABASE CHARACTER SET utf8 COLLATE utf8_unicode_ci;'); - - echo "-- Updating database schema\n"; - foreach (get_schema_list() as $file_rev => $file) { - if ($file_rev > $db_rev) { - printf('%03d -> %03d ...', $db_rev, $file_rev); - - $err = 0; - if (($data = file_get_contents($file)) !== false) { - foreach (explode("\n", $data) as $line) { - if (trim($line)) { - d_echo("$line \n"); - - if ($line[0] != '#') { - if (! dbQuery($line)) { - $return = 2; - $err++; - } - } - } - } - - echo " done ($err errors).\n"; - } else { - echo " Could not open file! $file\n"; - $return = 1; - }//end if - - if ($db_rev == 0) { - dbInsert(['version' => $file_rev], 'dbSchema'); - } else { - dbUpdate(['version' => $file_rev], 'dbSchema'); - } - $db_rev = $file_rev; - }//end if - }//end foreach - - echo "-- Done\n"; - // end legacy update - $db_rev = \LibreNMS\DB\Schema::getLegacySchema(); - } - - if ($db_rev == 1000) { - $return = Artisan::call('migrate', $migrate_opts); - echo Artisan::output(); - } - - $schemaLock->release(); -} diff --git a/misc/db_schema.yaml b/misc/db_schema.yaml index aa6d6adb00..b1166570e8 100644 --- a/misc/db_schema.yaml +++ b/misc/db_schema.yaml @@ -486,11 +486,6 @@ dashboards: - { Field: access, Type: tinyint, 'Null': false, Extra: '', Default: '0' } Indexes: PRIMARY: { Name: PRIMARY, Columns: [dashboard_id], Unique: true, Type: BTREE } -dbSchema: - Columns: - - { Field: version, Type: int, 'Null': false, Extra: '', Default: '0' } - Indexes: - PRIMARY: { Name: PRIMARY, Columns: [version], Unique: true, Type: BTREE } devices: Columns: - { Field: device_id, Type: 'int unsigned', 'Null': false, Extra: auto_increment } diff --git a/phpstan-deprecated.neon b/phpstan-deprecated.neon index a8dc14e921..cd9d280fca 100644 --- a/phpstan-deprecated.neon +++ b/phpstan-deprecated.neon @@ -22,6 +22,5 @@ parameters: - misc - resources - routes - - sql-schema - storage - tests diff --git a/scripts/github-remove b/scripts/github-remove index 91e100acfc..27c0ecae82 100755 --- a/scripts/github-remove +++ b/scripts/github-remove @@ -33,7 +33,7 @@ args = parser.parse_args() if args.discard: if confirm("Are you sure you want to delete all modified and untracked files?"): dirs = ["app/", "bootstrap/", "contrib/", "database/", "doc/", "html/", "includes/", "LibreNMS/", - "licenses/", "mibs/", "misc/", "resources/", "routes", "scripts/", "sql-schema/", "tests/"] + "licenses/", "mibs/", "misc/", "resources/", "routes", "scripts/", "tests/"] gitignores = ['.gitignore', 'bootstrap/cache/.gitignore', 'logs/.gitignore', diff --git a/sql-schema/001.sql b/sql-schema/001.sql deleted file mode 100644 index 219684529f..0000000000 --- a/sql-schema/001.sql +++ /dev/null @@ -1,52 +0,0 @@ -CREATE TABLE IF NOT EXISTS `alerts` ( `id` int(11) NOT NULL AUTO_INCREMENT, `importance` int(11) NOT NULL DEFAULT '0', `device_id` int(11) NOT NULL, `message` text NOT NULL, `time_logged` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `alerted` smallint(6) NOT NULL DEFAULT '0', KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `applications` ( `app_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `app_type` varchar(64) NOT NULL, PRIMARY KEY (`app_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `authlog` ( `id` int(11) NOT NULL AUTO_INCREMENT, `datetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `user` text NOT NULL, `address` text NOT NULL, `result` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `bgpPeers` ( `bgpPeer_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `astext` varchar(64) NOT NULL, `bgpPeerIdentifier` text NOT NULL, `bgpPeerRemoteAs` int(11) NOT NULL, `bgpPeerState` text NOT NULL, `bgpPeerAdminStatus` text NOT NULL, `bgpLocalAddr` text NOT NULL, `bgpPeerRemoteAddr` text NOT NULL, `bgpPeerInUpdates` int(11) NOT NULL, `bgpPeerOutUpdates` int(11) NOT NULL, `bgpPeerInTotalMessages` int(11) NOT NULL, `bgpPeerOutTotalMessages` int(11) NOT NULL, `bgpPeerFsmEstablishedTime` int(11) NOT NULL, `bgpPeerInUpdateElapsedTime` int(11) NOT NULL, PRIMARY KEY (`bgpPeer_id`), KEY `device_id` (`device_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `bgpPeers_cbgp` ( `device_id` int(11) NOT NULL, `bgpPeerIdentifier` varchar(64) NOT NULL, `afi` varchar(16) NOT NULL, `safi` varchar(16) NOT NULL, KEY `device_id` (`device_id`,`bgpPeerIdentifier`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `bills` ( `bill_id` int(11) NOT NULL AUTO_INCREMENT, `bill_name` text NOT NULL, `bill_type` text NOT NULL, `bill_cdr` int(11) DEFAULT NULL, `bill_day` int(11) NOT NULL DEFAULT '1', `bill_gb` int(11) DEFAULT NULL, `rate_95th_in` int(11) NOT NULL, `rate_95th_out` int(11) NOT NULL, `rate_95th` int(11) NOT NULL, `dir_95th` varchar(3) NOT NULL, `total_data` int(11) NOT NULL, `total_data_in` int(11) NOT NULL, `total_data_out` int(11) NOT NULL, `rate_average_in` int(11) NOT NULL, `rate_average_out` int(11) NOT NULL, `rate_average` int(11) NOT NULL, `bill_last_calc` datetime NOT NULL, `bill_custid` varchar(64) NOT NULL, `bill_ref` varchar(64) NOT NULL, `bill_notes` varchar(256) NOT NULL, `bill_autoadded` tinyint(1) NOT NULL, UNIQUE KEY `bill_id` (`bill_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 ; -CREATE TABLE IF NOT EXISTS `bill_data` ( `bill_id` int(11) NOT NULL, `timestamp` datetime NOT NULL, `period` int(11) NOT NULL, `delta` bigint(11) NOT NULL, `in_delta` bigint(11) NOT NULL, `out_delta` bigint(11) NOT NULL, KEY `bill_id` (`bill_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `bill_perms` ( `user_id` int(11) NOT NULL, `bill_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `bill_ports` ( `bill_id` int(11) NOT NULL, `port_id` int(11) NOT NULL, `bill_port_autoadded` tinyint(1) NOT NULL DEFAULT '0' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `cef_switching` ( `cef_switching_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `entPhysicalIndex` int(11) NOT NULL, `afi` varchar(4) COLLATE utf8_unicode_ci NOT NULL, `cef_index` int(11) NOT NULL, `cef_path` varchar(16) COLLATE utf8_unicode_ci NOT NULL, `drop` int(11) NOT NULL, `punt` int(11) NOT NULL, `punt2host` int(11) NOT NULL, `drop_prev` int(11) NOT NULL, `punt_prev` int(11) NOT NULL, `punt2host_prev` int(11) NOT NULL, `updated` int(11) NOT NULL, `updated_prev` int(11) NOT NULL, PRIMARY KEY (`cef_switching_id`), UNIQUE KEY `device_id` (`device_id`,`entPhysicalIndex`,`afi`,`cef_index`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `customers` ( `customer_id` int(11) NOT NULL AUTO_INCREMENT, `username` char(64) NOT NULL, `password` char(32) NOT NULL, `string` char(64) NOT NULL, `level` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`customer_id`), UNIQUE KEY `username` (`username`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `devices_attribs` ( `attrib_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `attrib_type` varchar(32) NOT NULL, `attrib_value` text NOT NULL, `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`attrib_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `devices_perms` ( `user_id` int(11) NOT NULL, `device_id` int(11) NOT NULL, `access_level` int(4) NOT NULL DEFAULT '0', KEY `user_id` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `device_graphs` ( `device_id` int(11) NOT NULL, `graph` varchar(32) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `eventlog` ( `event_id` int(11) NOT NULL AUTO_INCREMENT, `host` int(11) NOT NULL DEFAULT '0', `datetime` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', `message` text CHARACTER SET latin1, `type` varchar(64) CHARACTER SET latin1 DEFAULT NULL, `reference` varchar(64) CHARACTER SET latin1 NOT NULL, PRIMARY KEY (`event_id`), KEY `host` (`host`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `graph_types` ( `graph_type` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `graph_subtype` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `graph_section` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `graph_descr` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `graph_order` int(11) NOT NULL, KEY `graph_type` (`graph_type`), KEY `graph_subtype` (`graph_subtype`), KEY `graph_section` (`graph_section`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `graph_types_dead` ( `graph_type` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `graph_subtype` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `graph_section` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `graph_descr` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `graph_order` int(11) NOT NULL, KEY `graph_type` (`graph_type`), KEY `graph_subtype` (`graph_subtype`), KEY `graph_section` (`graph_section`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `hrDevice` ( `hrDevice_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `hrDeviceIndex` int(11) NOT NULL, `hrDeviceDescr` text CHARACTER SET latin1 NOT NULL, `hrDeviceType` text CHARACTER SET latin1 NOT NULL, `hrDeviceErrors` int(11) NOT NULL, `hrDeviceStatus` text CHARACTER SET latin1 NOT NULL, `hrProcessorLoad` tinyint(4) DEFAULT NULL, PRIMARY KEY (`hrDevice_id`), KEY `device_id` (`device_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `ipv4_addresses` ( `ipv4_address_id` int(11) NOT NULL AUTO_INCREMENT,`ipv4_address` varchar(32) CHARACTER SET latin1 NOT NULL, `ipv4_prefixlen` int(11) NOT NULL,`ipv4_network_id` varchar(32) CHARACTER SET latin1 NOT NULL, `interface_id` int(11) NOT NULL,PRIMARY KEY (`ipv4_address_id`), KEY `interface_id` (`interface_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `ipv4_mac` ( `interface_id` int(11) NOT NULL, `mac_address` varchar(32) CHARACTER SET latin1 NOT NULL, `ipv4_address` varchar(32) CHARACTER SET latin1 NOT NULL, KEY `interface_id` (`interface_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `ipv4_networks` ( `ipv4_network_id` int(11) NOT NULL AUTO_INCREMENT, `ipv4_network` varchar(64) CHARACTER SET latin1 NOT NULL, PRIMARY KEY (`ipv4_network_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `ipv6_addresses` ( `ipv6_address_id` int(11) NOT NULL AUTO_INCREMENT, `ipv6_address` varchar(128) CHARACTER SET latin1 NOT NULL, `ipv6_compressed` varchar(128) CHARACTER SET latin1 NOT NULL, `ipv6_prefixlen` int(11) NOT NULL, `ipv6_origin` varchar(16) CHARACTER SET latin1 NOT NULL, `ipv6_network_id` varchar(128) CHARACTER SET latin1 NOT NULL, `interface_id` int(11) NOT NULL, PRIMARY KEY (`ipv6_address_id`), KEY `interface_id` (`interface_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `ipv6_networks` ( `ipv6_network_id` int(11) NOT NULL AUTO_INCREMENT, `ipv6_network` varchar(64) CHARACTER SET latin1 NOT NULL, PRIMARY KEY (`ipv6_network_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `juniAtmVp` ( `juniAtmVp_id` int(11) NOT NULL, `interface_id` int(11) NOT NULL, `vp_id` int(11) NOT NULL, `vp_descr` varchar(32) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `links` ( `id` int(11) NOT NULL AUTO_INCREMENT, `local_interface_id` int(11) DEFAULT NULL, `remote_interface_id` int(11) DEFAULT NULL, `active` tinyint(4) NOT NULL DEFAULT '1', `protocol` varchar(11) DEFAULT NULL, `remote_hostname` varchar(128) NOT NULL, `remote_port` varchar(128) NOT NULL, `remote_platform` varchar(128) NOT NULL, `remote_version` varchar(256) NOT NULL, PRIMARY KEY (`id`), KEY `src_if` (`local_interface_id`), KEY `dst_if` (`remote_interface_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `mempools` ( `mempool_id` int(11) NOT NULL AUTO_INCREMENT, `mempool_index` varchar(16) CHARACTER SET latin1 NOT NULL, `entPhysicalIndex` int(11) DEFAULT NULL, `hrDeviceIndex` int(11) DEFAULT NULL, `mempool_type` varchar(32) CHARACTER SET latin1 NOT NULL, `mempool_precision` int(11) NOT NULL DEFAULT '1', `mempool_descr` varchar(64) CHARACTER SET latin1 NOT NULL, `device_id` int(11) NOT NULL, `mempool_perc` int(11) NOT NULL, `mempool_used` bigint(16) NOT NULL, `mempool_free` bigint(16) NOT NULL, `mempool_total` bigint(16) NOT NULL, `mempool_largestfree` bigint(16) DEFAULT NULL, `mempool_lowestfree` bigint(16) DEFAULT NULL, PRIMARY KEY (`mempool_id`), KEY `device_id` (`device_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `ospf_areas` ( `device_id` int(11) NOT NULL, `ospfAreaId` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfAuthType` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `ospfImportAsExtern` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `ospfSpfRuns` int(11) NOT NULL, `ospfAreaBdrRtrCount` int(11) NOT NULL, `ospfAsBdrRtrCount` int(11) NOT NULL, `ospfAreaLsaCount` int(11) NOT NULL, `ospfAreaLsaCksumSum` int(11) NOT NULL, `ospfAreaSummary` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `ospfAreaStatus` varchar(64) COLLATE utf8_unicode_ci NOT NULL, UNIQUE KEY `device_area` (`device_id`,`ospfAreaId`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `ospf_instances` ( `device_id` int(11) NOT NULL, `ospf_instance_id` int(11) NOT NULL, `ospfRouterId` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfAdminStat` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfVersionNumber` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfAreaBdrRtrStatus` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfASBdrRtrStatus` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfExternLsaCount` int(11) NOT NULL, `ospfExternLsaCksumSum` int(11) NOT NULL, `ospfTOSSupport` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfOriginateNewLsas` int(11) NOT NULL, `ospfRxNewLsas` int(11) NOT NULL, `ospfExtLsdbLimit` int(11) DEFAULT NULL, `ospfMulticastExtensions` int(11) DEFAULT NULL, `ospfExitOverflowInterval` int(11) DEFAULT NULL, `ospfDemandExtensions` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, UNIQUE KEY `device_id` (`device_id`,`ospf_instance_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `ospf_nbrs` ( `device_id` int(11) NOT NULL, `interface_id` int(11) NOT NULL, `ospf_nbr_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfNbrIpAddr` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfNbrAddressLessIndex` int(11) NOT NULL, `ospfNbrRtrId` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfNbrOptions` int(11) NOT NULL, `ospfNbrPriority` int(11) NOT NULL, `ospfNbrState` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfNbrEvents` int(11) NOT NULL, `ospfNbrLsRetransQLen` int(11) NOT NULL, `ospfNbmaNbrStatus` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfNbmaNbrPermanence` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfNbrHelloSuppressed` varchar(32) COLLATE utf8_unicode_ci NOT NULL, UNIQUE KEY `device_id` (`device_id`,`ospf_nbr_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `ospf_ports` ( `device_id` int(11) NOT NULL, `interface_id` int(11) NOT NULL, `ospf_port_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfIfIpAddress` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfAddressLessIf` int(11) NOT NULL, `ospfIfAreaId` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfIfType` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `ospfIfAdminStat` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `ospfIfRtrPriority` int(11) DEFAULT NULL, `ospfIfTransitDelay` int(11) DEFAULT NULL, `ospfIfRetransInterval` int(11) DEFAULT NULL, `ospfIfHelloInterval` int(11) DEFAULT NULL, `ospfIfRtrDeadInterval` int(11) DEFAULT NULL, `ospfIfPollInterval` int(11) DEFAULT NULL, `ospfIfState` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `ospfIfDesignatedRouter` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `ospfIfBackupDesignatedRouter` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `ospfIfEvents` int(11) DEFAULT NULL, `ospfIfAuthKey` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `ospfIfStatus` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `ospfIfMulticastForwarding` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `ospfIfDemand` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `ospfIfAuthType` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, UNIQUE KEY `device_id` (`device_id`,`ospf_port_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `perf_times` ( `type` varchar(8) CHARACTER SET latin1 NOT NULL, `doing` varchar(64) CHARACTER SET latin1 NOT NULL, `start` int(11) NOT NULL, `duration` double(8,2) NOT NULL, `devices` int(11) NOT NULL, KEY `type` (`type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `ports` ( `interface_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL DEFAULT '0', `port_descr_type` varchar(255) DEFAULT NULL, `port_descr_descr` varchar(255) DEFAULT NULL, `port_descr_circuit` varchar(255) DEFAULT NULL, `port_descr_speed` varchar(32) DEFAULT NULL, `port_descr_notes` varchar(255) DEFAULT NULL, `ifDescr` varchar(255) DEFAULT NULL, `ifName` varchar(64) DEFAULT NULL, `portName` varchar(128) DEFAULT NULL, `ifIndex` int(11) DEFAULT '0', `ifSpeed` bigint(20) DEFAULT NULL, `ifConnectorPresent` varchar(12) DEFAULT NULL, `ifPromiscuousMode` varchar(12) DEFAULT NULL, `ifHighSpeed` int(11) DEFAULT NULL, `ifOperStatus` varchar(16) DEFAULT NULL, `ifAdminStatus` varchar(16) DEFAULT NULL, `ifDuplex` varchar(12) DEFAULT NULL, `ifMtu` int(11) DEFAULT NULL, `ifType` text, `ifAlias` text, `ifPhysAddress` text, `ifHardType` varchar(64) DEFAULT NULL, `ifLastChange` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `ifVlan` varchar(8) NOT NULL DEFAULT '', `ifTrunk` varchar(8) DEFAULT '', `ifVrf` int(11) NOT NULL, `counter_in` int(11) DEFAULT NULL, `counter_out` int(11) DEFAULT NULL, `ignore` tinyint(1) NOT NULL DEFAULT '0', `disabled` tinyint(1) NOT NULL DEFAULT '0', `detailed` tinyint(1) NOT NULL DEFAULT '0', `deleted` tinyint(1) NOT NULL DEFAULT '0', `pagpOperationMode` varchar(32) DEFAULT NULL, `pagpPortState` varchar(16) DEFAULT NULL, `pagpPartnerDeviceId` varchar(48) DEFAULT NULL, `pagpPartnerLearnMethod` varchar(16) DEFAULT NULL, `pagpPartnerIfIndex` int(11) DEFAULT NULL, `pagpPartnerGroupIfIndex` int(11) DEFAULT NULL, `pagpPartnerDeviceName` varchar(128) DEFAULT NULL, `pagpEthcOperationMode` varchar(16) DEFAULT NULL, `pagpDeviceId` varchar(48) DEFAULT NULL, `pagpGroupIfIndex` int(11) DEFAULT NULL, `ifInUcastPkts` bigint(20) DEFAULT NULL, `ifInUcastPkts_prev` bigint(20) DEFAULT NULL, `ifInUcastPkts_delta` bigint(20) DEFAULT NULL, `ifInUcastPkts_rate` int(11) DEFAULT NULL, `ifOutUcastPkts` bigint(20) DEFAULT NULL, `ifOutUcastPkts_prev` bigint(20) DEFAULT NULL, `ifOutUcastPkts_delta` bigint(20) DEFAULT NULL, `ifOutUcastPkts_rate` int(11) DEFAULT NULL, `ifInErrors` bigint(20) DEFAULT NULL, `ifInErrors_prev` bigint(20) DEFAULT NULL, `ifInErrors_delta` bigint(20) DEFAULT NULL, `ifInErrors_rate` int(11) DEFAULT NULL, `ifOutErrors` bigint(20) DEFAULT NULL, `ifOutErrors_prev` bigint(20) DEFAULT NULL, `ifOutErrors_delta` bigint(20) DEFAULT NULL, `ifOutErrors_rate` int(11) DEFAULT NULL, `ifInOctets` bigint(20) DEFAULT NULL, `ifInOctets_prev` bigint(20) DEFAULT NULL, `ifInOctets_delta` bigint(20) DEFAULT NULL, `ifInOctets_rate` int(11) DEFAULT NULL, `ifOutOctets` bigint(20) DEFAULT NULL, `ifOutOctets_prev` bigint(20) DEFAULT NULL, `ifOutOctets_delta` bigint(20) DEFAULT NULL, `ifOutOctets_rate` int(11) DEFAULT NULL, `poll_time` int(11) DEFAULT NULL, `poll_prev` int(11) DEFAULT NULL, `poll_period` int(11) DEFAULT NULL, PRIMARY KEY (`interface_id`), UNIQUE KEY `device_ifIndex` (`device_id`,`ifIndex`), KEY `if_2` (`ifDescr`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `ports_adsl` ( `interface_id` int(11) NOT NULL, `port_adsl_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `adslLineCoding` varchar(8) COLLATE utf8_bin NOT NULL, `adslLineType` varchar(16) COLLATE utf8_bin NOT NULL, `adslAtucInvVendorID` varchar(8) COLLATE utf8_bin NOT NULL, `adslAtucInvVersionNumber` varchar(8) COLLATE utf8_bin NOT NULL, `adslAtucCurrSnrMgn` decimal(5,1) NOT NULL, `adslAtucCurrAtn` decimal(5,1) NOT NULL, `adslAtucCurrOutputPwr` decimal(5,1) NOT NULL, `adslAtucCurrAttainableRate` int(11) NOT NULL, `adslAtucChanCurrTxRate` int(11) NOT NULL, `adslAturInvSerialNumber` varchar(8) COLLATE utf8_bin NOT NULL, `adslAturInvVendorID` varchar(8) COLLATE utf8_bin NOT NULL, `adslAturInvVersionNumber` varchar(8) COLLATE utf8_bin NOT NULL, `adslAturChanCurrTxRate` int(11) NOT NULL, `adslAturCurrSnrMgn` decimal(5,1) NOT NULL, `adslAturCurrAtn` decimal(5,1) NOT NULL, `adslAturCurrOutputPwr` decimal(5,1) NOT NULL, `adslAturCurrAttainableRate` int(11) NOT NULL, UNIQUE KEY `interface_id` (`interface_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -CREATE TABLE IF NOT EXISTS `ports_perms` ( `user_id` int(11) NOT NULL, `interface_id` int(11) NOT NULL, `access_level` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `ports_stack` ( `device_id` int(11) NOT NULL, `interface_id_high` int(11) NOT NULL, `interface_id_low` int(11) NOT NULL, `ifStackStatus` varchar(32) COLLATE utf8_unicode_ci NOT NULL, UNIQUE KEY `device_id` (`device_id`,`interface_id_high`,`interface_id_low`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `port_in_measurements` ( `port_id` int(11) NOT NULL, `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `counter` bigint(11) NOT NULL, `delta` bigint(11) NOT NULL, KEY `port_id` (`port_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `port_out_measurements` ( `port_id` int(11) NOT NULL, `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `counter` bigint(11) NOT NULL, `delta` bigint(11) NOT NULL, KEY `port_id` (`port_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `pseudowires` ( `pseudowire_id` int(11) NOT NULL AUTO_INCREMENT, `interface_id` int(11) NOT NULL, `peer_device_id` int(11) NOT NULL, `peer_ldp_id` int(11) NOT NULL, `cpwVcID` int(11) NOT NULL, `cpwOid` int(11) NOT NULL, PRIMARY KEY (`pseudowire_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `sensors` ( `sensor_id` int(11) NOT NULL AUTO_INCREMENT, `sensor_class` varchar(64) CHARACTER SET latin1 NOT NULL, `device_id` int(11) NOT NULL DEFAULT '0', `poller_type` varchar(16) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'snmp', `sensor_oid` varchar(64) CHARACTER SET latin1 NOT NULL, `sensor_index` varchar(10) COLLATE utf8_unicode_ci NOT NULL, `sensor_type` varchar(255) CHARACTER SET latin1 NOT NULL, `sensor_descr` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `sensor_divisor` int(11) NOT NULL DEFAULT '1', `sensor_multiplier` int(11) NOT NULL DEFAULT '1', `sensor_current` float DEFAULT NULL, `sensor_limit` float DEFAULT NULL, `sensor_limit_warn` float DEFAULT NULL, `sensor_limit_low` float DEFAULT NULL, `sensor_limit_low_warn` float DEFAULT NULL, `entPhysicalIndex` varchar(16) CHARACTER SET latin1 DEFAULT NULL, `entPhysicalIndex_measured` varchar(16) CHARACTER SET latin1 DEFAULT NULL, PRIMARY KEY (`sensor_id`), KEY `sensor_host` (`device_id`), KEY `sensor_class` (`sensor_class`), KEY `sensor_type` (`sensor_type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `services` ( `service_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `service_ip` text NOT NULL, `service_type` varchar(16) NOT NULL, `service_desc` text NOT NULL, `service_param` text NOT NULL, `service_ignore` tinyint(1) NOT NULL, `service_status` tinyint(4) NOT NULL DEFAULT '0', `service_checked` int(11) NOT NULL DEFAULT '0', `service_changed` int(11) NOT NULL DEFAULT '0', `service_message` text NOT NULL, `service_disabled` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`service_id`), KEY `service_host` (`device_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `syslog` ( `device_id` int(11) DEFAULT NULL, `facility` varchar(10) DEFAULT NULL, `priority` varchar(10) DEFAULT NULL, `level` varchar(10) DEFAULT NULL, `tag` varchar(10) DEFAULT NULL, `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `program` varchar(32) DEFAULT NULL, `msg` text, `seq` bigint(20) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`seq`), KEY `datetime` (`timestamp`), KEY `device_id` (`device_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `toner` ( `toner_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL DEFAULT '0', `toner_index` int(11) NOT NULL, `toner_type` varchar(64) NOT NULL, `toner_oid` varchar(64) NOT NULL, `toner_descr` varchar(32) NOT NULL DEFAULT '', `toner_capacity` int(11) NOT NULL DEFAULT '0', `toner_current` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`toner_id`), KEY `device_id` (`device_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `ucd_diskio` ( `diskio_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `diskio_index` int(11) NOT NULL, `diskio_descr` varchar(32) CHARACTER SET latin1 NOT NULL, PRIMARY KEY (`diskio_id`), KEY `device_id` (`device_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `users` ( `user_id` int(11) NOT NULL AUTO_INCREMENT, `username` char(30) NOT NULL, `password` varchar(34) DEFAULT NULL, `realname` varchar(64) NOT NULL, `email` varchar(64) NOT NULL, `descr` char(30) NOT NULL, `level` tinyint(4) NOT NULL DEFAULT '0', `can_modify_passwd` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`user_id`), UNIQUE KEY `username` (`username`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `users_prefs` ( `user_id` int(16) NOT NULL, `pref` varchar(32) NOT NULL, `value` varchar(128) NOT NULL, PRIMARY KEY (`user_id`), UNIQUE KEY `user_id.pref` (`user_id`,`pref`), KEY `pref` (`pref`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `vlans` ( `vlan_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) DEFAULT NULL, `vlan_vlan` int(11) DEFAULT NULL, `vlan_domain` text, `vlan_descr` text, PRIMARY KEY (`vlan_id`), KEY `device_id` (`device_id`,`vlan_vlan`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `vminfo` ( `id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `vm_type` varchar(16) NOT NULL DEFAULT 'vmware', `vmwVmVMID` int(11) NOT NULL, `vmwVmDisplayName` varchar(128) NOT NULL, `vmwVmGuestOS` varchar(128) NOT NULL, `vmwVmMemSize` int(11) NOT NULL, `vmwVmCpus` int(11) NOT NULL, `vmwVmState` varchar(128) NOT NULL, PRIMARY KEY (`id`), KEY `device_id` (`device_id`), KEY `vmwVmVMID` (`vmwVmVMID`)) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `vrfs` ( `vrf_id` int(11) NOT NULL AUTO_INCREMENT, `vrf_oid` varchar(256) NOT NULL, `vrf_name` varchar(128) DEFAULT NULL, `mplsVpnVrfRouteDistinguisher` varchar(128) DEFAULT NULL, `mplsVpnVrfDescription` text NOT NULL, `device_id` int(11) NOT NULL, PRIMARY KEY (`vrf_id`), KEY `device_id` (`device_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `bill_history` ( `bill_hist_id` int(11) NOT NULL AUTO_INCREMENT, `bill_id` int(11) NOT NULL, `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `bill_datefrom` datetime NOT NULL, `bill_dateto` datetime NOT NULL, `bill_type` text NOT NULL, `bill_allowed` bigint(20) NOT NULL, `bill_used` bigint(20) NOT NULL, `bill_overuse` bigint(20) NOT NULL, `bill_percent` decimal(10,2) NOT NULL, `rate_95th_in` bigint(20) NOT NULL, `rate_95th_out` bigint(20) NOT NULL, `rate_95th` bigint(20) NOT NULL, `dir_95th` varchar(3) NOT NULL, `rate_average` bigint(20) NOT NULL, `rate_average_in` bigint(20) NOT NULL, `rate_average_out` bigint(20) NOT NULL, `traf_in` bigint(20) NOT NULL, `traf_out` bigint(20) NOT NULL, `traf_total` bigint(20) NOT NULL, `pdf` longblob, PRIMARY KEY (`bill_hist_id`), UNIQUE KEY `unique_index` (`bill_id`,`bill_datefrom`,`bill_dateto`), KEY `bill_id` (`bill_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ; -CREATE TABLE IF NOT EXISTS `entPhysical_state` ( `device_id` int(11) NOT NULL, `entPhysicalIndex` varchar(64) NOT NULL, `subindex` varchar(64) DEFAULT NULL, `group` varchar(64) NOT NULL, `key` varchar(64) NOT NULL, `value` varchar(255) NOT NULL, KEY `device_id_index` (`device_id`,`entPhysicalIndex`)) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `ports_vlans` ( `port_vlan_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `interface_id` int(11) NOT NULL, `vlan` int(11) NOT NULL, `baseport` int(11) NOT NULL, `priority` bigint(32) NOT NULL, `state` varchar(16) NOT NULL, `cost` int(11) NOT NULL, PRIMARY KEY (`port_vlan_id`), UNIQUE KEY `unique` (`device_id`,`interface_id`,`vlan`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ; -CREATE TABLE IF NOT EXISTS `netscaler_vservers` ( `vsvr_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `vsvr_name` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `vsvr_ip` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `vsvr_port` int(8) NOT NULL, `vsvr_type` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `vsvr_state` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `vsvr_clients` int(11) NOT NULL, `vsvr_server` int(11) NOT NULL, `vsvr_req_rate` int(11) NOT NULL, `vsvr_bps_in` int(11) NOT NULL, `vsvr_bps_out` int(11) NOT NULL, PRIMARY KEY (`vsvr_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/sql-schema/002.sql b/sql-schema/002.sql deleted file mode 100644 index 0e0fab7f2f..0000000000 --- a/sql-schema/002.sql +++ /dev/null @@ -1,24 +0,0 @@ -CREATE TABLE IF NOT EXISTS `cmpMemPool` ( `cmp_id` int(11) NOT NULL auto_increment, `Index` varchar(8) NOT NULL, `cmpName` varchar(32) NOT NULL, `cmpValid` varchar(8) NOT NULL, `device_id` int(11) NOT NULL, `cmpUsed` int(11) NOT NULL, `cmpFree` int(11) NOT NULL, `cmpLargestFree` int(11) NOT NULL, `cmpAlternate` tinyint(4) default NULL, PRIMARY KEY (`cmp_id`), KEY `device_id` (`device_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1; -CREATE TABLE IF NOT EXISTS `hrDevice` ( `hrDevice_id` int(11) NOT NULL auto_increment, `device_id` int(11) NOT NULL, `hrDeviceIndex` int(11) NOT NULL, `hrDeviceDescr` text NOT NULL, `hrDeviceType` text NOT NULL, `hrDeviceErrors` int(11) NOT NULL, `hrDeviceStatus` text NOT NULL, `hrProcessorLoad` tinyint(4) default NULL, PRIMARY KEY (`hrDevice_id`), KEY `device_id` (`device_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1; -ALTER TABLE `devices` MODIFY `type` varchar(8) DEFAULT 'unknown'; -ALTER TABLE `devices` CHANGE `os` `os` VARCHAR( 32 ) NULL DEFAULT NULL; -CREATE TABLE IF NOT EXISTS `voltage` ( `volt_id` int(11) NOT NULL auto_increment, `volt_host` int(11) NOT NULL default '0', `volt_oid` varchar(64) NOT NULL, `volt_descr` varchar(32) NOT NULL default '', `volt_precision` int(11) NOT NULL default '1', `volt_current` int(11) NOT NULL default '0', `volt_limit` int(11) NOT NULL default '60', PRIMARY KEY (`volt_id`), KEY `volt_host` (`volt_host`)) ENGINE=InnoDB DEFAULT CHARSET=latin1; -CREATE TABLE IF NOT EXISTS `fanspeed` ( `fan_id` int(11) NOT NULL auto_increment, `fan_host` int(11) NOT NULL default '0', `fan_oid` varchar(64) NOT NULL, `fan_descr` varchar(32) NOT NULL default '', `fan_precision` int(11) NOT NULL default '1', `fan_current` int(11) NOT NULL default '0', `fan_limit` int(11) NOT NULL default '60', PRIMARY KEY (`fan_id`), KEY `fan_host` (`fan_host`)) ENGINE=InnoDB DEFAULT CHARSET=latin1; -ALTER TABLE `voltage` ADD `volt_limit_low` int(11) NULL DEFAULT NULL AFTER `volt_limit`; -ALTER TABLE `voltage` CHANGE `volt_current` `volt_current` FLOAT(3) NULL DEFAULT NULL; -ALTER TABLE `voltage` CHANGE `volt_limit` `volt_limit` FLOAT(3) NULL DEFAULT NULL; -ALTER TABLE `voltage` CHANGE `volt_limit_low` `volt_limit_low` FLOAT(3) NULL DEFAULT NULL; -ALTER TABLE `fanspeed` ADD `fan_index` INT NOT NULL AFTER `fan_host` , ADD `fan_mibtype` VARCHAR( 32 ) NOT NULL AFTER `fan_index`; -ALTER TABLE `fanspeed` CHANGE `fan_host` `device_id` INT( 11 ) NOT NULL DEFAULT '0'; -ALTER TABLE `voltage` CHANGE `volt_host` `device_id` INT( 11 ) NOT NULL DEFAULT '0'; -ALTER TABLE `fanspeed` CHANGE `fan_mibtype` `fan_type` varchar(64) NOT NULL ; -ALTER TABLE `voltage` ADD `volt_index` VARCHAR( 8 ) NOT NULL AFTER `volt_oid`,ADD `volt_type` VARCHAR( 32 ) NOT NULL AFTER `volt_index` ; -ALTER TABLE `processors` CHANGE `processor_type` `processor_type` varchar(16) NOT NULL; -ALTER TABLE `bgpPeers_cbgp` CHANGE `afi` `afi` VARCHAR( 16 ) NOT NULL , CHANGE `safi` `safi` VARCHAR( 16 ) NOT NULL; -ALTER TABLE `processors` CHANGE `processor_oid` `processor_oid` VARCHAR( 128 ) NOT NULL; -ALTER TABLE eventlog CHANGE `type` `type` VARCHAR( 64 ) NOT NULL; -CREATE TABLE IF NOT EXISTS `mempools` ( `mempool_id` int(11) NOT NULL AUTO_INCREMENT, `mempool_index` varchar(8) CHARACTER SET latin1 NOT NULL, `entPhysicalIndex` int(11) DEFAULT NULL, `hrDeviceIndex` int(11) DEFAULT NULL, `mempool_type` varchar(32) CHARACTER SET latin1 NOT NULL, `mempool_precision` int(11) NOT NULL DEFAULT '1', `mempool_descr` varchar(32) CHARACTER SET latin1 NOT NULL, `device_id` int(11) NOT NULL, `mempool_used` int(11) NOT NULL, `mempool_free` int(11) NOT NULL, `mempool_total` int(11) NOT NULL, `mempool_largestfree` int(11) DEFAULT NULL, `mempool_lowestfree` int(11) DEFAULT NULL, PRIMARY KEY (`mempool_id`), KEY `device_id` (`device_id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin ; -ALTER TABLE `storage` CHANGE `storage_id` `storage_id` INT( 11 ) NOT NULL AUTO_INCREMENT , CHANGE `storage_perc` `storage_perc` TEXT CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL; -ALTER TABLE `storage` CHANGE `storage_size` `storage_size` BIGINT NOT NULL ,CHANGE `storage_used` `storage_used` BIGINT NOT NULL ,CHANGE `storage_free` `storage_free` BIGINT NOT NULL; -ALTER TABLE `mempools` CHANGE `mempool_used` `mempool_used` BIGINT( 20 ) NOT NULL , CHANGE `mempool_free` `mempool_free` BIGINT( 20 ) NOT NULL ,CHANGE `mempool_total` `mempool_total` BIGINT( 20 ) NOT NULL ,CHANGE `mempool_largestfree` `mempool_largestfree` BIGINT( 20 ) NULL DEFAULT NULL ,CHANGE `mempool_lowestfree` `mempool_lowestfree` BIGINT( 20 ) NULL DEFAULT NULL; -CREATE TABLE IF NOT EXISTS `juniAtmVp` ( `juniAtmVp_id` int(11) NOT NULL AUTO_INCREMENT, `interface_id` int(11) NOT NULL, `vp_id` int(11) NOT NULL, `vp_descr` varchar(32) NOT NULL, PRIMARY KEY (`juniAtmVp_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; diff --git a/sql-schema/003.sql b/sql-schema/003.sql deleted file mode 100644 index ecd162e801..0000000000 --- a/sql-schema/003.sql +++ /dev/null @@ -1,30 +0,0 @@ -CREATE TABLE IF NOT EXISTS `toner` ( `toner_id` int(11) NOT NULL auto_increment, `device_id` int(11) NOT NULL default '0', `toner_index` int(11) NOT NULL, `toner_type` varchar(64) NOT NULL, `toner_oid` varchar(64) NOT NULL, `toner_descr` varchar(32) NOT NULL default '', `toner_capacity` int(11) NOT NULL default '0', `toner_current` int(11) NOT NULL default '0', PRIMARY KEY (`toner_id`), KEY `device_id` (`device_id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1; -ALTER TABLE `mempools` CHANGE `mempool_descr` `mempool_descr` VARCHAR( 64 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL; -ALTER TABLE `processors` CHANGE `processor_descr` `processor_descr` VARCHAR( 64 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL; -DROP TABLE `cmpMemPool`; -ALTER TABLE `mempools` CHANGE `mempool_used` `mempool_used` BIGINT( 16 ) NOT NULL ,CHANGE `mempool_free` `mempool_free` BIGINT( 16 ) NOT NULL ,CHANGE `mempool_total` `mempool_total` BIGINT( 16 ) NOT NULL ,CHANGE `mempool_largestfree` `mempool_largestfree` BIGINT( 16 ) NULL DEFAULT NULL ,CHANGE `mempool_lowestfree` `mempool_lowestfree` BIGINT( 16 ) NULL DEFAULT NULL ; -CREATE TABLE IF NOT EXISTS `frequency` ( `freq_id` int(11) NOT NULL auto_increment, `device_id` int(11) NOT NULL default '0', `freq_oid` varchar(64) NOT NULL, `freq_index` varchar(8) NOT NULL, `freq_type` varchar(32) NOT NULL, `freq_descr` varchar(32) NOT NULL default '', `freq_precision` int(11) NOT NULL default '1', `freq_current` float default NULL, `freq_limit` float default NULL, `freq_limit_low` float default NULL, PRIMARY KEY (`freq_id`), KEY `freq_host` (`device_id`)) ENGINE=MyISAM AUTO_INCREMENT=189 DEFAULT CHARSET=latin1; -CREATE TABLE IF NOT EXISTS `current` ( `current_id` int(11) NOT NULL auto_increment, `device_id` int(11) NOT NULL default '0', `current_oid` varchar(64) NOT NULL, `current_index` varchar(8) NOT NULL, `current_type` varchar(32) NOT NULL, `current_descr` varchar(32) NOT NULL default '', `current_precision` int(11) NOT NULL default '1', `current_current` float default NULL, `current_limit` float default NULL, `current_limit_warn` float default NULL, `current_limit_low` float default NULL, PRIMARY KEY (`current_id`), KEY `current_host` (`device_id`)) ENGINE=MyISAM AUTO_INCREMENT=189 DEFAULT CHARSET=latin1; -ALTER TABLE `ports` CHANGE `ifDescr` `ifDescr` VARCHAR(255) NOT NULL; -CREATE TABLE IF NOT EXISTS `ucd_diskio` ( `diskio_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `diskio_index` int(11) NOT NULL, `diskio_descr` varchar(32) NOT NULL, PRIMARY KEY (`diskio_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=11 ; -ALTER TABLE `eventlog` CHANGE `type` `type` VARCHAR( 64 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL; -CREATE TABLE IF NOT EXISTS `applications` ( `app_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `app_type` varchar(64) NOT NULL, PRIMARY KEY (`app_id`)) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ; -## 0.10.6 -CREATE TABLE IF NOT EXISTS `sensors` ( `sensor_id` int(11) NOT NULL auto_increment, `sensor_class` varchar(64) NOT NULL, `device_id` int(11) NOT NULL default '0', `sensor_oid` varchar(64) NOT NULL, `sensor_index` varchar(8) NOT NULL, `sensor_type` varchar(32) NOT NULL, `sensor_descr` varchar(32) NOT NULL default '', `sensor_precision` int(11) NOT NULL default '1', `sensor_current` float default NULL, `sensor_limit` float default NULL, `sensor_limit_warn` float default NULL, `sensor_limit_low` float default NULL, `sensor_limit_low_warn` float default NULL, PRIMARY KEY (`sensor_id`), KEY `sensor_host` (`device_id`)) ENGINE=MyISAM AUTO_INCREMENT=189 DEFAULT CHARSET=latin1; -ALTER TABLE `devices` CHANGE `type` `type` VARCHAR(20) NOT NULL; -ALTER TABLE `voltage` CHANGE `volt_index` `volt_index` VARCHAR(10) NOT NULL; -ALTER TABLE `frequency` CHANGE `freq_index` `freq_index` VARCHAR(10) NOT NULL; -ALTER TABLE `sensors` CHANGE `sensor_index` `sensor_index` VARCHAR(10) NOT NULL; -DROP TABLE `fanspeed`; -DROP TABLE `voltage`; -DROP TABLE `current`; -ALTER TABLE `processors` ADD INDEX ( `device_id` ); -ALTER TABLE `ucd_diskio` ADD INDEX ( `device_id` ); -ALTER TABLE `storage` ADD INDEX ( `device_id` ); -ALTER TABLE `mac_accounting` ADD INDEX ( `interface_id` ); -ALTER TABLE `ipv4_addresses` ADD INDEX ( `interface_id` ); -ALTER TABLE `ipv6_addresses` ADD INDEX ( `interface_id` ); -ALTER TABLE `ipv4_mac` ADD INDEX ( `interface_id` ); -CREATE TABLE IF NOT EXISTS `ports_adsl` ( `interface_id` int(11) NOT NULL, `port_adsl_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `adslLineCoding` varchar(8) COLLATE utf8_bin NOT NULL, `adslLineType` varchar(16) COLLATE utf8_bin NOT NULL, `adslAtucInvVendorID` varchar(8) COLLATE utf8_bin NOT NULL, `adslAtucInvVersionNumber` varchar(8) COLLATE utf8_bin NOT NULL, `adslAtucCurrSnrMgn` decimal(5,1) NOT NULL, `adslAtucCurrAtn` decimal(5,1) NOT NULL, `adslAtucCurrOutputPwr` decimal(5,1) NOT NULL, `adslAtucCurrAttainableRate` int(11) NOT NULL, `adslAtucChanCurrTxRate` int(11) NOT NULL, `adslAturInvSerialNumber` varchar(8) COLLATE utf8_bin NOT NULL, `adslAturInvVendorID` varchar(8) COLLATE utf8_bin NOT NULL, `adslAturInvVersionNumber` varchar(8) COLLATE utf8_bin NOT NULL, `adslAturChanCurrTxRate` int(11) NOT NULL, `adslAturCurrSnrMgn` decimal(5,1) NOT NULL, `adslAturCurrAtn` decimal(5,1) NOT NULL, `adslAturCurrOutputPwr` decimal(5,1) NOT NULL, `adslAturCurrAttainableRate` int(11) NOT NULL, UNIQUE KEY `interface_id` (`interface_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -## 0.10.7 -CREATE TABLE IF NOT EXISTS `perf_times` ( `type` varchar(8) NOT NULL, `doing` varchar(64) NOT NULL, `start` int(11) NOT NULL, `duration` double(5,2) NOT NULL, `devices` int(11) NOT NULL, KEY `type` (`type`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; diff --git a/sql-schema/004.sql b/sql-schema/004.sql deleted file mode 100644 index 4ab3b73361..0000000000 --- a/sql-schema/004.sql +++ /dev/null @@ -1,26 +0,0 @@ -CREATE TABLE IF NOT EXISTS `device_graphs` ( `device_id` int(11) NOT NULL, `graph` varchar(32) COLLATE utf8_unicode_ci NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -DROP TABLE IF EXISTS `graph_types`; -CREATE TABLE IF NOT EXISTS `graph_types` ( `graph_type` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `graph_subtype` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `graph_section` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `graph_descr` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `graph_order` int(11) NOT NULL, KEY `graph_type` (`graph_type`), KEY `graph_subtype` (`graph_subtype`), KEY `graph_section` (`graph_section`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -DROP TABLE `frequency`; -ALTER TABLE `mempools` CHANGE `mempool_index` `mempool_index` VARCHAR( 16 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL; -ALTER TABLE `vrfs` CHANGE `mplsVpnVrfRouteDistinguisher` `mplsVpnVrfRouteDistinguisher` varchar(26) NOT NULL; -## Change port rrds -ALTER TABLE `perf_times` CHANGE `duration` `duration` DOUBLE( 8, 2 ) NOT NULL; -## Extend port descriptions -ALTER TABLE ports MODIFY port_descr_circuit VARCHAR(255); -ALTER TABLE ports MODIFY port_descr_descr VARCHAR(255); -ALTER TABLE ports MODIFY port_descr_notes VARCHAR(255); -ALTER TABLE devices MODIFY community VARCHAR(255); -ALTER TABLE users MODIFY password VARCHAR(34); -ALTER TABLE sensors MODIFY sensor_descr VARCHAR(255); -ALTER TABLE `vrfs` MODIFY `mplsVpnVrfRouteDistinguisher` VARCHAR(128); -ALTER TABLE `vrfs` MODIFY `vrf_name` VARCHAR(128); -ALTER TABLE `ports` MODIFY `ifDescr` VARCHAR(255); -ALTER TABLE `ports` MODIFY `port_descr_type` VARCHAR(255); -CREATE TABLE IF NOT EXISTS `cef_switching` ( `device_id` int(11) NOT NULL, `entPhysicalIndex` int(11) NOT NULL, `afi` varchar(4) COLLATE utf8_unicode_ci NOT NULL, `cef_index` int(11) NOT NULL, `cef_path` varchar(16) COLLATE utf8_unicode_ci NOT NULL, `drop` int(11) NOT NULL, `punt` int(11) NOT NULL, `punt2host` int(11) NOT NULL, `drop_prev` int(11) NOT NULL, `punt_prev` int(11) NOT NULL, `punt2host_prev` int(11) NOT NULL,`updated` INT NOT NULL , `updated_prev` INT NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -UPDATE sensors SET sensor_class='frequency' WHERE sensor_class='freq'; -CREATE TABLE IF NOT EXISTS `ospf_areas` ( `device_id` int(11) NOT NULL, `ospfAreaId` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfAuthType` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `ospfImportAsExtern` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `ospfSpfRuns` int(11) NOT NULL, `ospfAreaBdrRtrCount` int(11) NOT NULL, `ospfAsBdrRtrCount` int(11) NOT NULL, `ospfAreaLsaCount` int(11) NOT NULL, `ospfAreaLsaCksumSum` int(11) NOT NULL, `ospfAreaSummary` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `ospfAreaStatus` varchar(64) COLLATE utf8_unicode_ci NOT NULL, UNIQUE KEY `device_area` (`device_id`,`ospfAreaId`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `ospf_instances` ( `device_id` int(11) NOT NULL, `ospf_instance_id` int(11) NOT NULL, `ospfRouterId` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfAdminStat` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfVersionNumber` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfAreaBdrRtrStatus` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfASBdrRtrStatus` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfExternLsaCount` int(11) NOT NULL, `ospfExternLsaCksumSum` int(11) NOT NULL, `ospfTOSSupport` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfOriginateNewLsas` int(11) NOT NULL, `ospfRxNewLsas` int(11) NOT NULL, `ospfExtLsdbLimit` int(11) DEFAULT NULL, `ospfMulticastExtensions` int(11) DEFAULT NULL, `ospfExitOverflowInterval` int(11) DEFAULT NULL, `ospfDemandExtensions` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, UNIQUE KEY `device_id` (`device_id`,`ospf_instance_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `ospf_ports` ( `device_id` int(11) NOT NULL, `interface_id` int(11) NOT NULL, `ospf_port_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfIfIpAddress` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfAddressLessIf` int(11) NOT NULL, `ospfIfAreaId` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfIfType` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `ospfIfAdminStat` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `ospfIfRtrPriority` int(11) DEFAULT NULL, `ospfIfTransitDelay` int(11) DEFAULT NULL, `ospfIfRetransInterval` int(11) DEFAULT NULL, `ospfIfHelloInterval` int(11) DEFAULT NULL, `ospfIfRtrDeadInterval` int(11) DEFAULT NULL, `ospfIfPollInterval` int(11) DEFAULT NULL, `ospfIfState` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `ospfIfDesignatedRouter` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `ospfIfBackupDesignatedRouter` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `ospfIfEvents` int(11) DEFAULT NULL, `ospfIfAuthKey` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL, `ospfIfStatus` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `ospfIfMulticastForwarding` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `ospfIfDemand` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, `ospfIfAuthType` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL, UNIQUE KEY `device_id` (`device_id`,`interface_id`,`ospf_port_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `ospf_nbrs` ( `device_id` int(11) NOT NULL, `interface_id` int(11) NOT NULL, `ospf_nbr_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfNbrIpAddr` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfNbrAddressLessIndex` int(11) NOT NULL, `ospfNbrRtrId` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfNbrOptions` int(11) NOT NULL, `ospfNbrPriority` int(11) NOT NULL, `ospfNbrState` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfNbrEvents` int(11) NOT NULL, `ospfNbrLsRetransQLen` int(11) NOT NULL, `ospfNbmaNbrStatus` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfNbmaNbrPermanence` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `ospfNbrHelloSuppressed` varchar(32) COLLATE utf8_unicode_ci NOT NULL, UNIQUE KEY `device_id` (`device_id`,`ospf_nbr_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE IF NOT EXISTS `ports_stack` (`interface_id_high` INT NOT NULL ,`interface_id_low` INT NOT NULL) ENGINE = INNODB; diff --git a/sql-schema/005.sql b/sql-schema/005.sql deleted file mode 100644 index e36d4ec6cd..0000000000 --- a/sql-schema/005.sql +++ /dev/null @@ -1,11 +0,0 @@ -ALTER TABLE `storage` ADD UNIQUE `index_unique` ( `device_id` , `storage_mib` , `storage_index` ); -ALTER TABLE `bgpPeers_cbgp` ADD `AcceptedPrefixes` INT NOT NULL ,ADD `DeniedPrefixes` INT NOT NULL ,ADD `PrefixAdminLimit` INT NOT NULL ,ADD `PrefixThreshold` INT NOT NULL ,ADD `PrefixClearThreshold` INT NOT NULL ,ADD `AdvertisedPrefixes` INT NOT NULL ,ADD `SuppressedPrefixes` INT NOT NULL ,ADD `WithdrawnPrefixes` INT NOT NULL; -ALTER TABLE `bgpPeers_cbgp` ADD UNIQUE `unique_index` ( `device_id` , `bgpPeerIdentifier` , `afi` , `safi` ); -ALTER TABLE `devices` CHANGE `port` `port` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT '161'; -CREATE TABLE IF NOT EXISTS `ipsec_tunnels` ( `tunnel_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `peer_port` int(11) NOT NULL, `peer_addr` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `local_addr` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `local_port` int(11) NOT NULL, `tunnel_name` varchar(96) COLLATE utf8_unicode_ci NOT NULL, `tunnel_status` varchar(11) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`tunnel_id`), UNIQUE KEY `unique_index` (`device_id`,`peer_addr`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -ALTER TABLE `syslog` ADD INDEX ( `program` ); -ALTER TABLE `devices` ADD `sysObjectID` VARCHAR( 64 ) NULL DEFAULT NULL AFTER `bgpLocalAs`; -ALTER TABLE `ports` CHANGE `ifSpeed` `ifSpeed` BIGINT NULL DEFAULT NULL; -ALTER TABLE `sensors` CHANGE `sensor_oid` `sensor_oid` VARCHAR( 255 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL; -CREATE TABLE IF NOT EXISTS `entPhysical_state` ( `device_id` int(11) NOT NULL, `entPhysicalIndex` varchar(64) NOT NULL, `subindex` varchar(64) DEFAULT NULL, `group` varchar(64) NOT NULL, `key` varchar(64) NOT NULL, `value` varchar(255) NOT NULL, KEY `device_id_index` (`device_id`,`entPhysicalIndex`)) ENGINE=MyISAM DEFAULT CHARSET=latin1; -CREATE TABLE IF NOT EXISTS `ports_vlans` ( `port_vlan_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `interface_id` int(11) NOT NULL, `vlan` int(11) NOT NULL, `baseport` int(11) NOT NULL, `priority` bigint(32) NOT NULL, `state` varchar(16) NOT NULL, `cost` int(11) NOT NULL, PRIMARY KEY (`port_vlan_id`), UNIQUE KEY `unique` (`device_id`,`interface_id`,`vlan`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 ; diff --git a/sql-schema/006.sql b/sql-schema/006.sql deleted file mode 100644 index b625b6eb27..0000000000 --- a/sql-schema/006.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE `bills` CHANGE `bill_cdr` `bill_cdr` BIGINT( 20 ) NULL DEFAULT NULL; -CREATE TABLE IF NOT EXISTS `loadbalancer_rservers` ( `rserver_id` int(11) NOT NULL AUTO_INCREMENT, `farm_id` varchar(128) CHARACTER SET utf8 NOT NULL, `device_id` int(11) NOT NULL, `StateDescr` varchar(64) CHARACTER SET utf8 NOT NULL, PRIMARY KEY (`rserver_id`)) ENGINE=MyISAM AUTO_INCREMENT=514 DEFAULT CHARSET=utf8; -CREATE TABLE IF NOT EXISTS `loadbalancer_vservers` ( `classmap_id` int(11) NOT NULL, `classmap` varchar(128) NOT NULL, `serverstate` varchar(64) NOT NULL, `device_id` int(11) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -ALTER TABLE `sensors` CHANGE `sensor_index` `sensor_index` VARCHAR( 64 ); -CREATE TABLE IF NOT EXISTS `netscaler_vservers` ( `vsvr_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `vsvr_name` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `vsvr_ip` varchar(128) COLLATE utf8_unicode_ci NOT NULL, `vsvr_port` int(8) NOT NULL, `vsvr_type` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `vsvr_state` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `vsvr_clients` int(11) NOT NULL, `vsvr_server` int(11) NOT NULL, `vsvr_req_rate` int(11) NOT NULL, `vsvr_bps_in` int(11) NOT NULL, `vsvr_bps_out` int(11) NOT NULL, PRIMARY KEY (`vsvr_id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ; diff --git a/sql-schema/007.sql b/sql-schema/007.sql deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sql-schema/008.sql b/sql-schema/008.sql deleted file mode 100644 index b27e7d9f63..0000000000 --- a/sql-schema/008.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `bills` CHANGE `bill_gb` `bill_quota` BIGINT( 20 ) NULL DEFAULT NULL; diff --git a/sql-schema/009.sql b/sql-schema/009.sql deleted file mode 100644 index 33225c1dd0..0000000000 --- a/sql-schema/009.sql +++ /dev/null @@ -1,10 +0,0 @@ -ALTER TABLE `bills` CHANGE `rate_95th_in` `rate_95th_in` BIGINT( 20 ) NOT NULL; -ALTER TABLE `bills` CHANGE `rate_95th_out` `rate_95th_out` BIGINT( 20 ) NOT NULL; -ALTER TABLE `bills` CHANGE `rate_95th` `rate_95th` BIGINT( 20 ) NOT NULL; -ALTER TABLE `bills` CHANGE `total_data` `total_data` BIGINT( 20 ) NOT NULL; -ALTER TABLE `bills` CHANGE `total_data_in` `total_data_in` BIGINT( 20 ) NOT NULL ; -ALTER TABLE `bills` CHANGE `total_data_out` `total_data_out` BIGINT( 20 ) NOT NULL; -ALTER TABLE `bills` CHANGE `rate_average_in` `rate_average_in` BIGINT( 20 ) NOT NULL; -ALTER TABLE `bills` CHANGE `rate_average_out` `rate_average_out` BIGINT( 20 ) NOT NULL; -ALTER TABLE `bills` CHANGE `rate_average` `rate_average` BIGINT( 20 ) NOT NULL; - diff --git a/sql-schema/010.sql b/sql-schema/010.sql deleted file mode 100644 index 6d911d55e0..0000000000 --- a/sql-schema/010.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `eventlog` ADD INDEX `datetime` ( `datetime` ); diff --git a/sql-schema/011.sql b/sql-schema/011.sql deleted file mode 100644 index bfceb2c2c9..0000000000 --- a/sql-schema/011.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE IF NOT EXISTS `packages` ( `pkg_id` int(11) NOT NULL auto_increment, `device_id` int(11) NOT NULL, `name` varchar(64) NOT NULL, `manager` varchar(16) NOT NULL default '1', `status` tinyint(1) NOT NULL, `version` varchar(64) NOT NULL, `build` varchar(64) NOT NULL, `arch` varchar(16) NOT NULL, `size` bigint(20) default NULL, PRIMARY KEY (`pkg_id`), UNIQUE KEY `unique_key` (`device_id`,`name`,`manager`,`arch`,`version`,`build`), KEY `device_id` (`device_id`)) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_bin; diff --git a/sql-schema/012.sql b/sql-schema/012.sql deleted file mode 100644 index ec9872489c..0000000000 --- a/sql-schema/012.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE IF NOT EXISTS `slas` ( `sla_id` int(11) NOT NULL auto_increment, `device_id` int(11) NOT NULL, `sla_nr` int(11) NOT NULL, `owner` varchar(255) NOT NULL, `tag` varchar(255) NOT NULL, `rtt_type` varchar(16) NOT NULL, `status` tinyint(1) NOT NULL, `deleted` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`sla_id`), UNIQUE KEY `unique_key` (`device_id`,`sla_nr`), KEY `device_id` (`device_id`)) ENGINE=MyISAM CHARSET=utf8 COLLATE=utf8_bin; diff --git a/sql-schema/013.sql b/sql-schema/013.sql deleted file mode 100644 index 77b6f82813..0000000000 --- a/sql-schema/013.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `devices` ADD COLUMN `icon` VARCHAR(255) DEFAULT NULL; diff --git a/sql-schema/014.sql b/sql-schema/014.sql deleted file mode 100644 index 5c6b6dfd3a..0000000000 --- a/sql-schema/014.sql +++ /dev/null @@ -1,2 +0,0 @@ -CREATE TABLE IF NOT EXISTS `munin_plugins` ( `mplug_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `mplug_type` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `mplug_instance` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `mplug_category` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `mplug_title` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `mplug_info` text CHARACTER SET utf8 COLLATE utf8_bin, `mplug_vlabel` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `mplug_args` varchar(512) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, `mplug_total` binary(1) NOT NULL DEFAULT '0', `mplug_graph` binary(1) NOT NULL DEFAULT '1', PRIMARY KEY (`mplug_id`), UNIQUE KEY `UNIQUE` (`device_id`,`mplug_type`), KEY `device_id` (`device_id`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin ; -CREATE TABLE IF NOT EXISTS `munin_plugins_ds` ( `mplug_id` int(11) NOT NULL, `ds_name` varchar(32) COLLATE utf8_bin NOT NULL, `ds_type` enum('COUNTER','ABSOLUTE','DERIVE','GAUGE') COLLATE utf8_bin NOT NULL DEFAULT 'GAUGE', `ds_label` varchar(64) COLLATE utf8_bin NOT NULL, `ds_cdef` text COLLATE utf8_bin NOT NULL, `ds_draw` varchar(64) COLLATE utf8_bin NOT NULL, `ds_graph` enum('no','yes') COLLATE utf8_bin NOT NULL DEFAULT 'yes', `ds_info` varchar(255) COLLATE utf8_bin NOT NULL, `ds_extinfo` text COLLATE utf8_bin NOT NULL, `ds_max` varchar(32) COLLATE utf8_bin NOT NULL, `ds_min` varchar(32) COLLATE utf8_bin NOT NULL, `ds_negative` varchar(32) COLLATE utf8_bin NOT NULL, `ds_warning` varchar(32) COLLATE utf8_bin NOT NULL, `ds_critical` varchar(32) COLLATE utf8_bin NOT NULL, `ds_colour` varchar(32) COLLATE utf8_bin NOT NULL, `ds_sum` text CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, `ds_stack` text COLLATE utf8_bin NOT NULL, `ds_line` varchar(64) COLLATE utf8_bin NOT NULL, UNIQUE KEY `splug_id` (`mplug_id`,`ds_name`)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; diff --git a/sql-schema/015.sql b/sql-schema/015.sql deleted file mode 100644 index 577b526e83..0000000000 --- a/sql-schema/015.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `munin_plugins_ds` CHANGE `ds_cdef` `ds_cdef` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL; -ALTER TABLE `applications` ADD `app_state` TEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL; diff --git a/sql-schema/016.sql b/sql-schema/016.sql deleted file mode 100644 index 800a39288d..0000000000 --- a/sql-schema/016.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE `vlans` ADD `vlan_type` VARCHAR( 16 ) NULL; -ALTER TABLE `vlans` CHANGE `vlan_domain` `vlan_domain` INT NULL DEFAULT NULL; -ALTER TABLE `vlans` CHANGE `vlan_descr` `vlan_name` VARCHAR( 32 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL; -ALTER TABLE `vlans` ADD `vlan_mtu` INT NULL; -ALTER TABLE `applications` ADD `app_status` VARCHAR( 8 ) NOT NULL ; diff --git a/sql-schema/017.sql b/sql-schema/017.sql deleted file mode 100644 index c751529e46..0000000000 --- a/sql-schema/017.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `sensors` SET sensor_limit=sensor_limit/1.3*1.8 WHERE sensor_class='fanspeed'; diff --git a/sql-schema/018.sql b/sql-schema/018.sql deleted file mode 100644 index ffb4df62db..0000000000 --- a/sql-schema/018.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `pseudowires` ADD `device_id` INT NOT NULL AFTER `pseudowire_id`; -TRUNCATE TABLE `pseudowires`; -ALTER TABLE `pseudowires` ADD `pw_type` VARCHAR( 32 ) NOT NULL ,ADD `pw_psntype` VARCHAR( 32 ) NOT NULL ,ADD `pw_local_mtu` INT NOT NULL ,ADD `pw_peer_mtu` INT NOT NULL ,ADD `pw_descr` VARCHAR( 128 ) NOT NULL; diff --git a/sql-schema/019.sql b/sql-schema/019.sql deleted file mode 100644 index 0d1622ce08..0000000000 --- a/sql-schema/019.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `toner` ADD `toner_capacity_oid` VARCHAR( 64 ); diff --git a/sql-schema/020.sql b/sql-schema/020.sql deleted file mode 100644 index e228401d19..0000000000 --- a/sql-schema/020.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE `devices` ADD `authlevel` ENUM("noAuthNoPriv", "authNoPriv", "authPriv") NULL DEFAULT NULL AFTER `community`; -ALTER TABLE `devices` ADD `authname` VARCHAR(64) NULL DEFAULT NULL AFTER `authlevel`; -ALTER TABLE `devices` ADD `authpass` VARCHAR(64) NULL DEFAULT NULL AFTER `authname`; -ALTER TABLE `devices` ADD `authalgo` ENUM("MD5", "SHA1") NULL DEFAULT NULL AFTER `authpass`; -ALTER TABLE `devices` ADD `cryptopass` VARCHAR(64) NULL DEFAULT NULL AFTER `authalgo`; -ALTER TABLE `devices` ADD `cryptoalgo` ENUM("AES", "DES") NULL DEFAULT NULL AFTER `cryptopass`; diff --git a/sql-schema/021.sql b/sql-schema/021.sql deleted file mode 100644 index 0fa3e682f7..0000000000 --- a/sql-schema/021.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `applications` CHANGE `app_state` `app_state` VARCHAR( 32 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'UNKNOWN'; -ALTER TABLE `applications` CHANGE `app_type` `app_type` VARCHAR( 64 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `devices` CHANGE `authalgo` `authalgo` ENUM( 'MD5', 'SHA' ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL; diff --git a/sql-schema/022.sql b/sql-schema/022.sql deleted file mode 100644 index d4cbc003ca..0000000000 --- a/sql-schema/022.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `ports` CHANGE `interface_id` `port_id` INT( 11 ) NOT NULL AUTO_INCREMENT; diff --git a/sql-schema/023.sql b/sql-schema/023.sql deleted file mode 100644 index e6968b33b0..0000000000 --- a/sql-schema/023.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE `storage` ADD `storage_deleted` BOOL NOT NULL DEFAULT '0'; -ALTER TABLE `links` CHANGE `local_interface_id` `local_port_id` INT( 11 ) NULL DEFAULT NULL; -ALTER TABLE `links` CHANGE `remote_interface_id` `remote_port_id` INT( 11 ) NULL DEFAULT NULL; -ALTER TABLE `sensors` ADD `sensor_deleted` BOOL NOT NULL DEFAULT '0' AFTER `sensor_id`; -ALTER TABLE `mempools` ADD `mempool_deleted` BOOL NOT NULL DEFAULT '0'; diff --git a/sql-schema/024.sql b/sql-schema/024.sql deleted file mode 100644 index 8ece7077b1..0000000000 --- a/sql-schema/024.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `ipv4_addresses` CHANGE `interface_id` `port_id` INT( 11 ) NOT NULL; -ALTER TABLE `ipv6_addresses` CHANGE `interface_id` `port_id` INT( 11 ) NOT NULL; diff --git a/sql-schema/025.sql b/sql-schema/025.sql deleted file mode 100644 index 48cbfbadad..0000000000 --- a/sql-schema/025.sql +++ /dev/null @@ -1,11 +0,0 @@ -ALTER TABLE `ipv4_mac` CHANGE `interface_id` `port_id` INT( 11 ) NOT NULL; -ALTER TABLE `juniAtmVp` CHANGE `interface_id` `port_id` INT( 11 ) NOT NULL; -ALTER TABLE `ospf_nbrs` CHANGE `interface_id` `port_id` INT( 11 ) NOT NULL; -ALTER TABLE `mac_accounting` CHANGE `interface_id` `port_id` INT( 11 ) NOT NULL; -ALTER TABLE `ospf_ports` CHANGE `interface_id` `port_id` INT( 11 ) NOT NULL; -ALTER TABLE `ports_adsl` CHANGE `interface_id` `port_id` INT( 11 ) NOT NULL; -ALTER TABLE `ports_perms` CHANGE `interface_id` `port_id` INT( 11 ) NOT NULL; -ALTER TABLE `ports_stack` CHANGE `interface_id_high` `port_id_high` INT( 11 ) NOT NULL; -ALTER TABLE `ports_stack` CHANGE `interface_id_low` `port_id_low` INT( 11 ) NOT NULL; -ALTER TABLE `ports_vlans` CHANGE `interface_id` `port_id` INT( 11 ) NOT NULL; -ALTER TABLE `pseudowires` CHANGE `interface_id` `port_id` INT( 11 ) NOT NULL; diff --git a/sql-schema/026.sql b/sql-schema/026.sql deleted file mode 100644 index 39be485f64..0000000000 --- a/sql-schema/026.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE IF NOT EXISTS `access_points` ( `accesspoint_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `radio_number` tinyint(4) DEFAULT NULL, `type` varchar(16) NOT NULL, `mac_addr` varchar(24) NOT NULL, `deleted` tinyint(1) NOT NULL DEFAULT '0', `channel` tinyint(4) unsigned NOT NULL DEFAULT '0', `txpow` tinyint(4) NOT NULL DEFAULT '0', `radioutil` tinyint(4) NOT NULL DEFAULT '0', `numasoclients` smallint(6) NOT NULL DEFAULT '0', `nummonclients` smallint(6) NOT NULL DEFAULT '0', `numactbssid` tinyint(4) NOT NULL DEFAULT '0', `nummonbssid` tinyint(4) NOT NULL DEFAULT '0', `interference` tinyint(3) unsigned NOT NULL, PRIMARY KEY (`accesspoint_id`), KEY `deleted` (`deleted`), KEY `name` (`name`,`radio_number`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Access Points'; \ No newline at end of file diff --git a/sql-schema/027.sql b/sql-schema/027.sql deleted file mode 100644 index d019ea4354..0000000000 --- a/sql-schema/027.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `juniAtmVp` ADD INDEX ( `port_id` ); -ALTER TABLE `loadbalancer_vservers` ADD INDEX ( `device_id` ); diff --git a/sql-schema/028.sql b/sql-schema/028.sql deleted file mode 100644 index d076e410bd..0000000000 --- a/sql-schema/028.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `users` CHANGE `password` `password` VARCHAR( 60 ); diff --git a/sql-schema/029.sql b/sql-schema/029.sql deleted file mode 100644 index d6e8a57143..0000000000 --- a/sql-schema/029.sql +++ /dev/null @@ -1,2 +0,0 @@ -CREATE TABLE IF NOT EXISTS `session` ( `session_id` int(11) NOT NULL AUTO_INCREMENT, `session_username` varchar(30) NOT NULL, `session_value` varchar(60) NOT NULL, `session_token` varchar(60) NOT NULL, `session_auth` varchar(16) NOT NULL, `session_expiry` int(11) NOT NULL, PRIMARY KEY (`session_id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; - diff --git a/sql-schema/030.sql b/sql-schema/030.sql deleted file mode 100644 index 5acc85c2e0..0000000000 --- a/sql-schema/030.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE IF NOT EXISTS `plugins` ( `plugin_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `plugin_name` VARCHAR( 60 ) NOT NULL , `plugin_active` INT NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; diff --git a/sql-schema/031.sql b/sql-schema/031.sql deleted file mode 100644 index 96a662fd02..0000000000 --- a/sql-schema/031.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `sensors` ADD `sensor_alert` TINYINT( 1 ) NOT NULL DEFAULT '1' AFTER `sensor_limit_low_warn` ; diff --git a/sql-schema/032.sql b/sql-schema/032.sql deleted file mode 100644 index f9f9189f1b..0000000000 --- a/sql-schema/032.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE IF NOT EXISTS `ciscoASA` ( `ciscoASA_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `oid` varchar(255) NOT NULL, `data` bigint(20) NOT NULL, `high_alert` bigint(20) NOT NULL, `low_alert` bigint(20) NOT NULL, `disabled` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`ciscoASA_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; diff --git a/sql-schema/033.sql b/sql-schema/033.sql deleted file mode 100644 index 94eabe4c78..0000000000 --- a/sql-schema/033.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE `api_tokens` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `token_hash` varchar(32) NOT NULL, `description` varchar(100) NOT NULL, `disabled` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `token_hash` (`token_hash`)) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1; diff --git a/sql-schema/034.sql b/sql-schema/034.sql deleted file mode 100644 index 5958a1aff4..0000000000 --- a/sql-schema/034.sql +++ /dev/null @@ -1,2 +0,0 @@ --- Allow for future use of different tokens - this supports up to SHA-512 -ALTER TABLE `api_tokens` MODIFY `token_hash` VARCHAR(256); diff --git a/sql-schema/035.sql b/sql-schema/035.sql deleted file mode 100644 index 7212038b9e..0000000000 --- a/sql-schema/035.sql +++ /dev/null @@ -1,2 +0,0 @@ --- Update to add ping response time and last ping datetime -ALTER TABLE `devices` ADD `last_ping` TIMESTAMP NULL AFTER `last_discovered` , ADD `last_ping_timetaken` DOUBLE( 5, 2 ) NULL AFTER `last_ping` ; diff --git a/sql-schema/036.sql b/sql-schema/036.sql deleted file mode 100644 index e2a05cab80..0000000000 --- a/sql-schema/036.sql +++ /dev/null @@ -1,10 +0,0 @@ -DROP TABLE IF EXISTS `alerts`; -CREATE TABLE IF NOT EXISTS `alerts` ( `id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `rule_id` int(11) NOT NULL, `state` int(11) NOT NULL, `alerted` int(11) NOT NULL, `open` int(11) NOT NULL, `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8; -DROP TABLE IF EXISTS `alert_log`; -CREATE TABLE IF NOT EXISTS `alert_log` ( `id` int(11) NOT NULL AUTO_INCREMENT, `rule_id` int(11) NOT NULL, `device_id` int(11) NOT NULL, `state` int(11) NOT NULL, `details` longblob NOT NULL, `time_logged` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY `id` (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8; -DROP TABLE IF EXISTS `alert_rules`; -CREATE TABLE IF NOT EXISTS `alert_rules` ( `id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `rule` text CHARACTER SET utf8 NOT NULL, `severity` enum('ok','warning','critical') CHARACTER SET utf8 NOT NULL, `extra` varchar(255) CHARACTER SET utf8 NOT NULL, `disabled` tinyint(1) NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8; -DROP TABLE IF EXISTS `alert_schedule`; -CREATE TABLE IF NOT EXISTS `alert_schedule` ( `id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `start` timestamp NOT NULL DEFAULT '1970-01-02 00:00:01', `end` timestamp NOT NULL DEFAULT '1970-01-02 00:00:01', PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8; -DROP TABLE IF EXISTS `alert_templates`; -CREATE TABLE IF NOT EXISTS `alert_templates` ( `id` int(11) NOT NULL AUTO_INCREMENT, `rule_id` varchar(255) NOT NULL DEFAULT ',',`name` varchar(255) NOT NULL, `template` longtext NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/sql-schema/037.sql b/sql-schema/037.sql deleted file mode 100644 index cd8bf0e9a7..0000000000 --- a/sql-schema/037.sql +++ /dev/null @@ -1,2 +0,0 @@ --- Adds name column to alert_rules table -ALTER TABLE `alert_rules` ADD `name` VARCHAR( 255 ) NOT NULL ; diff --git a/sql-schema/038.sql b/sql-schema/038.sql deleted file mode 100644 index b32bab4c1f..0000000000 --- a/sql-schema/038.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `users` ADD `twofactor` VARCHAR( 255 ) NOT NULL; diff --git a/sql-schema/039.sql b/sql-schema/039.sql deleted file mode 100644 index c9f2c7a8f3..0000000000 --- a/sql-schema/039.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE IF NOT EXISTS `processes` ( `device_id` int(11) NOT NULL, `pid` int(255) NOT NULL, `vsz` int(255) NOT NULL, `rss` int(255) NOT NULL, `cputime` varchar(12) NOT NULL, `user` varchar(50) NOT NULL, `command` varchar(255) NOT NULL, KEY `device_id` (`device_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; diff --git a/sql-schema/040.sql b/sql-schema/040.sql deleted file mode 100644 index d3d954ff81..0000000000 --- a/sql-schema/040.sql +++ /dev/null @@ -1,8 +0,0 @@ -ALTER TABLE `devices` CHANGE `agent_uptime` `agent_uptime` INT( 11 ) NOT NULL DEFAULT '0'; -ALTER TABLE `devices` CHANGE `type` `type` VARCHAR( 20 ) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT ''; -ALTER TABLE `ports` CHANGE `ifVrf` `ifVrf` INT( 11 ) NOT NULL DEFAULT '0'; -ALTER TABLE `storage` CHANGE `storage_free` `storage_free` BIGINT( 20 ) NOT NULL DEFAULT '0'; -ALTER TABLE `storage` CHANGE `storage_used` `storage_used` BIGINT( 20 ) NOT NULL DEFAULT '0'; -ALTER TABLE `storage` CHANGE `storage_perc` `storage_perc` INT NOT NULL DEFAULT '0'; -ALTER TABLE `processors` CHANGE `entPhysicalIndex` `entPhysicalIndex` INT( 11 ) NOT NULL DEFAULT '0'; -ALTER TABLE `hrDevice` CHANGE `hrDeviceErrors` `hrDeviceErrors` INT( 11 ) NOT NULL DEFAULT '0'; diff --git a/sql-schema/041.sql b/sql-schema/041.sql deleted file mode 100644 index ced377e24b..0000000000 --- a/sql-schema/041.sql +++ /dev/null @@ -1,9 +0,0 @@ -ALTER TABLE `devices_attribs` ADD INDEX ( `device_id` ); -ALTER TABLE `device_graphs` ADD INDEX ( `device_id` ); -ALTER TABLE `alert_log` ADD INDEX ( `rule_id` ); -ALTER TABLE `alert_log` ADD INDEX ( `device_id` ); -ALTER TABLE `alerts` ADD INDEX ( `rule_id` ); -ALTER TABLE `alerts` ADD INDEX ( `device_id` ); -ALTER TABLE `ciscoASA` ADD INDEX ( `device_id` ); -ALTER TABLE `alert_schedule` ADD INDEX ( `device_id` ); -ALTER TABLE `alert_rules` ADD INDEX ( `device_id` ); diff --git a/sql-schema/042.sql b/sql-schema/042.sql deleted file mode 100644 index 6c66ad7ec3..0000000000 --- a/sql-schema/042.sql +++ /dev/null @@ -1,2 +0,0 @@ -CREATE TABLE `pollers` (`id` int(11) NOT NULL AUTO_INCREMENT, `poller_name` varchar(255) NOT NULL, `last_polled` datetime NOT NULL, `devices` int(11) NOT NULL, `time_taken` double NOT NULL, KEY `id` (`id`)) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; -ALTER TABLE `devices` ADD `poller_group` INT(11) NOT NULL DEFAULT '0'; diff --git a/sql-schema/043.sql b/sql-schema/043.sql deleted file mode 100644 index 0a4025ff5d..0000000000 --- a/sql-schema/043.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE `poller_groups` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,`group_name` VARCHAR( 255 ) NOT NULL ,`descr` VARCHAR( 255 ) NOT NULL) ENGINE = INNODB; diff --git a/sql-schema/044.sql b/sql-schema/044.sql deleted file mode 100644 index d7937a78c1..0000000000 --- a/sql-schema/044.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `links` ADD `local_device_id` INT NOT NULL AFTER `local_port_id` , ADD `remote_device_id` INT NOT NULL AFTER `remote_hostname` ; -ALTER TABLE `links` ADD INDEX ( `local_device_id` , `remote_device_id` ) ; diff --git a/sql-schema/045.sql b/sql-schema/045.sql deleted file mode 100644 index 6678875b61..0000000000 --- a/sql-schema/045.sql +++ /dev/null @@ -1,5 +0,0 @@ -CREATE TABLE IF NOT EXISTS `device_groups` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL DEFAULT '', `desc` varchar(255) NOT NULL DEFAULT '', `pattern` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`)) ENGINE=InnoDB; -CREATE TABLE IF NOT EXISTS `alert_map` ( `id` int(11) NOT NULL AUTO_INCREMENT, `rule` int(11) NOT NULL DEFAULT '0', `target` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '', PRIMARY KEY (`id`)) ENGINE=InnoDB; -ALTER TABLE `alert_rules` ADD UNIQUE (`name`); -ALTER TABLE `alert_rules` CHANGE `device_id` `device_id` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT ''; - diff --git a/sql-schema/046.sql b/sql-schema/046.sql deleted file mode 100644 index 6e9731270f..0000000000 --- a/sql-schema/046.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE `callback` ( `callback_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `name` CHAR( 64 ) NOT NULL , `value` CHAR( 64 ) NOT NULL ) ENGINE = INNODB; diff --git a/sql-schema/047.sql b/sql-schema/047.sql deleted file mode 100644 index ef57c40203..0000000000 --- a/sql-schema/047.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `alert_log` ADD INDEX ( `time_logged` ); diff --git a/sql-schema/048.sql b/sql-schema/048.sql deleted file mode 100644 index 226be63c45..0000000000 --- a/sql-schema/048.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `alert_schedule` DROP `device_id`; -ALTER TABLE `alert_schedule` CHANGE `id` `schedule_id` INT( 11 ) NOT NULL AUTO_INCREMENT; -ALTER TABLE `alert_schedule` ADD `title` VARCHAR( 255 ) NOT NULL ,ADD `notes` TEXT NOT NULL ; -CREATE TABLE `alert_schedule_items` (`item_id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,`schedule_id` INT NOT NULL ,`target` VARCHAR( 255 ) NOT NULL ,INDEX ( `schedule_id` )) ENGINE = INNODB; diff --git a/sql-schema/049.sql b/sql-schema/049.sql deleted file mode 100644 index 9583cb592c..0000000000 --- a/sql-schema/049.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE device_groups MODIFY COLUMN pattern TEXT; diff --git a/sql-schema/050.sql b/sql-schema/050.sql deleted file mode 100644 index 70413dcaf3..0000000000 --- a/sql-schema/050.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `sensors` ADD `sensor_custom` ENUM( 'No', 'Yes' ) NOT NULL DEFAULT 'No' AFTER `sensor_alert` ; diff --git a/sql-schema/051.sql b/sql-schema/051.sql deleted file mode 100644 index c6a45c91e6..0000000000 --- a/sql-schema/051.sql +++ /dev/null @@ -1,2 +0,0 @@ -DROP TABLE IF EXISTS `config`; -CREATE TABLE `config` ( `config_id` int(11) NOT NULL AUTO_INCREMENT, `config_name` varchar(255) NOT NULL, `config_value` varchar(512) NOT NULL, `config_default` varchar(512) NOT NULL, `config_descr` varchar(100) NOT NULL, `config_group` varchar(50) NOT NULL, `config_group_order` int(11) NOT NULL, `config_sub_group` varchar(50) NOT NULL, `config_sub_group_order` int(11) NOT NULL, `config_hidden` enum('0','1') NOT NULL DEFAULT '0', `config_disabled` enum('0','1') NOT NULL DEFAULT '0', PRIMARY KEY (`config_id`)) ENGINE=InnoDB AUTO_INCREMENT=720 DEFAULT CHARSET=latin1; diff --git a/sql-schema/052.sql b/sql-schema/052.sql deleted file mode 100644 index b8d215ebbf..0000000000 --- a/sql-schema/052.sql +++ /dev/null @@ -1,8 +0,0 @@ -ALTER TABLE `munin_plugins` CHANGE `mplug_type` `mplug_type` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL; -ALTER TABLE slas ENGINE=InnoDB; -ALTER TABLE packages ENGINE=InnoDB; -ALTER TABLE munin_plugins_ds ENGINE=InnoDB; -ALTER TABLE munin_plugins ENGINE=InnoDB; -ALTER TABLE loadbalancer_vservers ENGINE=InnoDB; -ALTER TABLE loadbalancer_rservers ENGINE=InnoDB; -ALTER TABLE ipsec_tunnels ENGINE=InnoDB; diff --git a/sql-schema/053.sql b/sql-schema/053.sql deleted file mode 100644 index df4d56a409..0000000000 --- a/sql-schema/053.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE `alert_template_map` (`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,`alert_templates_id` INT NOT NULL ,`alert_rule_id` INT NOT NULL ,INDEX ( `alert_templates_id` , `alert_rule_id` )) ENGINE = INNODB; diff --git a/sql-schema/054.sql b/sql-schema/054.sql deleted file mode 100644 index 5122975a78..0000000000 --- a/sql-schema/054.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `graph_types` CHANGE `graph_subtype` `graph_subtype` varchar(64); -ALTER TABLE `device_graphs` CHANGE `graph` `graph` varchar(64); -ALTER TABLE `graph_types` CHANGE `graph_descr` `graph_descr` varchar(255); -ALTER TABLE `graph_types` ADD PRIMARY KEY (`graph_type`, `graph_subtype`, `graph_section`); diff --git a/sql-schema/055.sql b/sql-schema/055.sql deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sql-schema/056.sql b/sql-schema/056.sql deleted file mode 100644 index a22011413a..0000000000 --- a/sql-schema/056.sql +++ /dev/null @@ -1,3 +0,0 @@ -CREATE TABLE IF NOT EXISTS `device_perf` ( `id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `timestamp` datetime NOT NULL, `xmt` float NOT NULL, `rcv` float NOT NULL, `loss` float NOT NULL, `min` float NOT NULL, `max` float NOT NULL, `avg` float NOT NULL, KEY `id` (`id`,`device_id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; -ALTER TABLE `devices` ADD `status_reason` VARCHAR( 50 ) NOT NULL AFTER `status` ; -UPDATE `devices` SET `status_reason`='down' WHERE `status`=0; diff --git a/sql-schema/057.sql b/sql-schema/057.sql deleted file mode 100644 index 57b0730767..0000000000 --- a/sql-schema/057.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `ipv4_mac` CHANGE `mac_address` `mac_address` VARCHAR( 32 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL , CHANGE `ipv4_address` `ipv4_address` VARCHAR( 32 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL; -ALTER TABLE `ipv4_mac` ADD INDEX ( `port_id`), ADD INDEX (`mac_address` ); -ALTER TABLE `ipv4_mac` DROP INDEX `interface_id`, DROP INDEX `interface_id_2`; diff --git a/sql-schema/058.sql b/sql-schema/058.sql deleted file mode 100644 index 956926219a..0000000000 --- a/sql-schema/058.sql +++ /dev/null @@ -1,5 +0,0 @@ -CREATE TABLE `locations` ( `id` INT NOT NULL AUTO_INCREMENT ,`location` TEXT NOT NULL ,`lat` FLOAT( 10, 6 ) NOT NULL ,`lng` FLOAT( 10, 6 ) NOT NULL ,`timestamp` DATETIME NOT NULL ,INDEX ( `id` )) ENGINE = INNODB; -LOCK TABLES `devices` WRITE; -ALTER TABLE `devices` ADD `override_sysLocation` bool DEFAULT false; -UNLOCK TABLES; -UPDATE `devices` LEFT JOIN devices_attribs AS sysloc_bool ON(devices.device_id=sysloc_bool.device_id and sysloc_bool.attrib_type = 'override_sysLocation_bool') LEFT JOIN devices_attribs AS sysloc_string ON(devices.device_id=sysloc_string.device_id and sysloc_string.attrib_type = 'override_sysLocation_string') SET `override_sysLocation` = true, `location` = sysloc_string.attrib_value WHERE sysloc_bool.attrib_value = 1; diff --git a/sql-schema/059.sql b/sql-schema/059.sql deleted file mode 100644 index ebfca59b3c..0000000000 --- a/sql-schema/059.sql +++ /dev/null @@ -1,3 +0,0 @@ -CREATE TABLE `users_widgets` ( `user_widget_id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `widget_id` int(11) NOT NULL, `col` tinyint(4) NOT NULL, `row` tinyint(4) NOT NULL, `size_x` tinyint(4) NOT NULL, `size_y` tinyint(4) NOT NULL, `title` varchar(255) NOT NULL, `refresh` tinyint(4) NOT NULL DEFAULT '60', PRIMARY KEY (`user_widget_id`), KEY `user_id` (`user_id`,`widget_id`) ) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=latin1; -CREATE TABLE `widgets` ( `widget_id` int(11) NOT NULL AUTO_INCREMENT, `widget_title` varchar(255) NOT NULL, `widget` varchar(255) NOT NULL, `base_dimensions` varchar(10) NOT NULL, PRIMARY KEY (`widget_id`), UNIQUE KEY `widget` (`widget`)) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1; -INSERT INTO `widgets` (`widget_id`, `widget_title`, `widget`, `base_dimensions`) VALUES (1, 'Availability map', 'availability-map', '4,3'), (2, 'Device summary horizontal', 'device-summary-horiz', '4,2'), (3, 'Alerts', 'alerts', '8,4'), (4, 'Device summary vertical', 'device-summary-vert', '4,3'), (5, 'World map', 'globe', '3,3'); diff --git a/sql-schema/060.sql b/sql-schema/060.sql deleted file mode 100644 index 93d006f8df..0000000000 --- a/sql-schema/060.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO `widgets` (`widget_title`, `widget`, `base_dimensions`) VALUES ('Syslog', 'syslog', '9,3'), ('Eventlog', 'eventlog', '9,5'), ('Global Map', 'worldmap', '8,6'); diff --git a/sql-schema/061.sql b/sql-schema/061.sql deleted file mode 100644 index e3037d39b5..0000000000 --- a/sql-schema/061.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `device_perf` DROP INDEX `id` , ADD INDEX `id` ( `id` ), ADD INDEX ( `device_id` ); diff --git a/sql-schema/062.sql b/sql-schema/062.sql deleted file mode 100644 index c02637fa0c..0000000000 --- a/sql-schema/062.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `bgpPeers` MODIFY `bgpPeerRemoteAs` bigint(20) NOT NULL; diff --git a/sql-schema/063.sql b/sql-schema/063.sql deleted file mode 100644 index dac3e71a2e..0000000000 --- a/sql-schema/063.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO `widgets` (`widget_title`, `widget`, `base_dimensions`) VALUES ('Graylog', 'graylog', '9,7'); diff --git a/sql-schema/064.sql b/sql-schema/064.sql deleted file mode 100644 index 13ebbb243d..0000000000 --- a/sql-schema/064.sql +++ /dev/null @@ -1 +0,0 @@ -insert into config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('alert.transports.pushbullet','','','Pushbullet access token','alerting',0,'transports',0,'0','0'); diff --git a/sql-schema/065.sql b/sql-schema/065.sql deleted file mode 100644 index 4fb76d358d..0000000000 --- a/sql-schema/065.sql +++ /dev/null @@ -1,5 +0,0 @@ -DELETE n1 FROM pollers n1, pollers n2 WHERE n1.last_polled < n2.last_polled and n1.poller_name = n2.poller_name; -ALTER TABLE pollers ADD PRIMARY KEY (poller_name); -ALTER TABLE `devices` ADD `last_poll_attempted` timestamp NULL DEFAULT NULL AFTER `last_polled`; -ALTER TABLE `devices` ADD INDEX `last_polled` (`last_polled`); -ALTER TABLE `devices` ADD INDEX `last_poll_attempted` (`last_poll_attempted`); diff --git a/sql-schema/066.sql b/sql-schema/066.sql deleted file mode 100644 index 37b4dc6ede..0000000000 --- a/sql-schema/066.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `alert_templates` ADD `title` VARCHAR(255) NULL DEFAULT NULL; -ALTER TABLE `alert_templates` ADD `title_rec` VARCHAR(255) NULL DEFAULT NULL; diff --git a/sql-schema/067.sql b/sql-schema/067.sql deleted file mode 100644 index 769f009419..0000000000 --- a/sql-schema/067.sql +++ /dev/null @@ -1,3 +0,0 @@ -CREATE TABLE `proxmox` ( `id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL DEFAULT '0', `vmid` int(11) NOT NULL, `cluster` varchar(255) NOT NULL, `description` varchar(255) DEFAULT NULL, `last_seen` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `cluster_vm` (`cluster`,`vmid`)) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE `proxmox_ports` ( `id` int(11) NOT NULL AUTO_INCREMENT, `vm_id` int(11) NOT NULL, `port` varchar(10) NOT NULL, `last_seen` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `vm_port` (`vm_id`,`port`)) ENGINE=InnoDB DEFAULT CHARSET=utf8; -ALTER TABLE `applications` ADD COLUMN `app_instance` varchar(255) NOT NULL; diff --git a/sql-schema/068.sql b/sql-schema/068.sql deleted file mode 100644 index d0bbda576d..0000000000 --- a/sql-schema/068.sql +++ /dev/null @@ -1,2 +0,0 @@ -alter table users_widgets add column `settings` text not null; -insert into widgets values(null,'Graph','generic-graph','6,2'); diff --git a/sql-schema/069.sql b/sql-schema/069.sql deleted file mode 100644 index a8eecc5cd2..0000000000 --- a/sql-schema/069.sql +++ /dev/null @@ -1,2 +0,0 @@ -CREATE TABLE `dashboards` ( `dashboard_id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL DEFAULT 0, `dashboard_name` varchar(255) NOT NULL, `access` int(1) NOT NULL DEFAULT 0, PRIMARY KEY (`dashboard_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8; -ALTER TABLE `users_widgets` ADD COLUMN `dashboard_id` int(11) NOT NULL; diff --git a/sql-schema/070.sql b/sql-schema/070.sql deleted file mode 100644 index 2503e7f747..0000000000 --- a/sql-schema/070.sql +++ /dev/null @@ -1,4 +0,0 @@ -UPDATE widgets SET widget_title = 'World map' WHERE widget = 'worldmap'; -UPDATE widgets SET widget_title = 'Globe map' WHERE widget = 'globe'; -UPDATE users_widgets SET title = 'World Map' WHERE widget_id = (SELECT widget_id FROM widgets WHERE widget = 'worldmap'); -UPDATE users_widgets SET title = 'Globe Map' WHERE widget_id = (SELECT widget_id FROM widgets WHERE widget = 'globe'); diff --git a/sql-schema/071.sql b/sql-schema/071.sql deleted file mode 100644 index 1b44ca4f43..0000000000 --- a/sql-schema/071.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO widgets VALUES (NULL, 'Top Devices', 'top-devices', '5,4'); -INSERT INTO widgets VALUES (NULL, 'Top Interfaces', 'top-interfaces', '5,4'); diff --git a/sql-schema/072.sql b/sql-schema/072.sql deleted file mode 100644 index 6748b6eb47..0000000000 --- a/sql-schema/072.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `devices` ADD COLUMN `notes` text; diff --git a/sql-schema/073.sql b/sql-schema/073.sql deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sql-schema/074.sql b/sql-schema/074.sql deleted file mode 100644 index 2b086026b5..0000000000 --- a/sql-schema/074.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('oxidized.enabled','false','false','Enable Oxidized support','external',0,'oxidized',0,'0','0'),('oxidized.url','','','Oxidized API url','external',0,'oxidized',0,'0','0'),('oxidized.features.versioning','false','false','Enable Oxidized config versioning','external',0,'oxidized',0,'0','0'); diff --git a/sql-schema/075.sql b/sql-schema/075.sql deleted file mode 100644 index de03028419..0000000000 --- a/sql-schema/075.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('alert.disable','false','false','Stop alerts being generated','alerting',0,'general',0,'0','0'); diff --git a/sql-schema/076.sql b/sql-schema/076.sql deleted file mode 100644 index 80cb87c4aa..0000000000 --- a/sql-schema/076.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('unix-agent.port','6556','6556','Default port for the Unix-agent (check_mk)','external',0,'unix-agent',0,'0','0'),('unix-agent.connection-timeout','10','10','Unix-agent connection timeout','external',0,'unix-agent',0,'0','0'),('unix-agent.read-timeout','10','10','Unix-agent read timeout','external',0,'unix-agent',0,'0','0'); diff --git a/sql-schema/077.sql b/sql-schema/077.sql deleted file mode 100644 index 3f84fd9f0b..0000000000 --- a/sql-schema/077.sql +++ /dev/null @@ -1,2 +0,0 @@ -CREATE TABLE `notifications` ( `notifications_id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL DEFAULT '', `body` text NOT NULL, `source` varchar(255) NOT NULL DEFAULT '', `checksum` varchar(128) NOT NULL, PRIMARY KEY (`notifications_id`), UNIQUE KEY `checksum` (`checksum`)) ENGINE=InnoDB DEFAULT CHARSET=utf8; -CREATE TABLE `notifications_attribs` ( `attrib_id` int(11) NOT NULL AUTO_INCREMENT, `notifications_id` int(11) NOT NULL, `user_id` int(11) NOT NULL, `key` varchar(255) NOT NULL DEFAULT '', `value` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`attrib_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/sql-schema/078.sql b/sql-schema/078.sql deleted file mode 100644 index 8ef025e410..0000000000 --- a/sql-schema/078.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('alert.transports.clickatell.token','','','Clickatell access token','alerting',0,'transports',0,'0','0'),('alert.transports.playsms.url','','','PlaySMS API URL','alerting',0,'transports',0,'0','0'),('alert.transports.playsms.user','','','PlaySMS User','alerting',0,'transports',0,'0','0'),('alert.transports.playsms.from','','','PlaySMS From','alerting',0,'transports',0,'0','0'),('alert.transports.playsms.token','','','PlaySMS Token','alerting',0,'transports',0,'0','0'), ('alert.transports.victorops.url','','','VictorOps Post URL - Replace routing_key!','alerting',0,'transports',0,'0','0'); diff --git a/sql-schema/079.sql b/sql-schema/079.sql deleted file mode 100644 index b4106e9528..0000000000 --- a/sql-schema/079.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('rrdtool','/usr/bin/rrdtool','/usr/bin/rrdtool','Path to rrdtool','external',0,'rrdtool',0,'0','0'), ('rrdtool_tune','false','false','Auto tune maximum value for rrd port files','external',0,'rrdtool',0,'0','0'); diff --git a/sql-schema/080.sql b/sql-schema/080.sql deleted file mode 100644 index b487367823..0000000000 --- a/sql-schema/080.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO widgets VALUES (NULL, 'Notes', 'notes', '5,4'); diff --git a/sql-schema/081.sql b/sql-schema/081.sql deleted file mode 100644 index 4a4353d433..0000000000 --- a/sql-schema/081.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `sensors` ADD `lastupdate` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP; diff --git a/sql-schema/082.sql b/sql-schema/082.sql deleted file mode 100644 index c8218e2322..0000000000 --- a/sql-schema/082.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE `ports_statistics` ( `port_id` int(11) NOT NULL, `ifInNUcastPkts` bigint(20) DEFAULT NULL, `ifInNUcastPkts_prev` bigint(20) DEFAULT NULL, `ifInNUcastPkts_delta` bigint(20) DEFAULT NULL, `ifInNUcastPkts_rate` int(11) DEFAULT NULL, `ifOutNUcastPkts` bigint(20) DEFAULT NULL, `ifOutNUcastPkts_prev` bigint(20) DEFAULT NULL, `ifOutNUcastPkts_delta` bigint(20) DEFAULT NULL, `ifOutNUcastPkts_rate` int(11) DEFAULT NULL, `ifInDiscards` bigint(20) DEFAULT NULL, `ifInDiscards_prev` bigint(20) DEFAULT NULL, `ifInDiscards_delta` bigint(20) DEFAULT NULL, `ifInDiscards_rate` int(11) DEFAULT NULL, `ifOutDiscards` bigint(20) DEFAULT NULL, `ifOutDiscards_prev` bigint(20) DEFAULT NULL, `ifOutDiscards_delta` bigint(20) DEFAULT NULL, `ifOutDiscards_rate` int(11) DEFAULT NULL, `ifInUnknownProtos` bigint(20) DEFAULT NULL, `ifInUnknownProtos_prev` bigint(20) DEFAULT NULL, `ifInUnknownProtos_delta` bigint(20) DEFAULT NULL, `ifInUnknownProtos_rate` int(11) DEFAULT NULL, `ifInBroadcastPkts` bigint(20) DEFAULT NULL, `ifInBroadcastPkts_prev` bigint(20) DEFAULT NULL, `ifInBroadcastPkts_delta` bigint(20) DEFAULT NULL, `ifInBroadcastPkts_rate` int(11) DEFAULT NULL, `ifOutBroadcastPkts` bigint(20) DEFAULT NULL, `ifOutBroadcastPkts_prev` bigint(20) DEFAULT NULL, `ifOutBroadcastPkts_delta` bigint(20) DEFAULT NULL, `ifOutBroadcastPkts_rate` int(11) DEFAULT NULL, `ifInMulticastPkts` bigint(20) DEFAULT NULL, `ifInMulticastPkts_prev` bigint(20) DEFAULT NULL, `ifInMulticastPkts_delta` bigint(20) DEFAULT NULL, `ifInMulticastPkts_rate` int(11) DEFAULT NULL, `ifOutMulticastPkts` bigint(20) DEFAULT NULL, `ifOutMulticastPkts_prev` bigint(20) DEFAULT NULL, `ifOutMulticastPkts_delta` bigint(20) DEFAULT NULL, `ifOutMulticastPkts_rate` int(11) DEFAULT NULL, PRIMARY KEY (`port_id`)) ENGINE=InnoDB; diff --git a/sql-schema/083.sql b/sql-schema/083.sql deleted file mode 100644 index 038e674cc7..0000000000 --- a/sql-schema/083.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO widgets VALUES (NULL, 'External Images', 'generic-image', '5,4'); diff --git a/sql-schema/084.sql b/sql-schema/084.sql deleted file mode 100644 index b9df6c3d26..0000000000 --- a/sql-schema/084.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `users` ADD `dashboard` INT( 11 ) DEFAULT 0 NOT NULL; diff --git a/sql-schema/085.sql b/sql-schema/085.sql deleted file mode 100644 index 6383926070..0000000000 --- a/sql-schema/085.sql +++ /dev/null @@ -1,5 +0,0 @@ -CREATE TABLE IF NOT EXISTS `mibdefs` ( `module` varchar(255) NOT NULL, `mib` varchar(255) NOT NULL, `object_type` varchar(255) NOT NULL, `oid` varchar(255) NOT NULL, `syntax` varchar(255) NOT NULL, `description` varchar(255), `max_access` varchar(255), `status` varchar(255), `included_by` varchar(255) NOT NULL, `last_modified` timestamp NOT NULL, PRIMARY KEY (`module`, `mib`, `object_type`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='MIB definitions'; -CREATE TABLE IF NOT EXISTS `device_mibs` ( `device_id` integer(11) NOT NULL, `module` varchar(255) NOT NULL, `mib` varchar(255) NOT NULL, `included_by` varchar(255) NOT NULL, `last_modified` timestamp NOT NULL, PRIMARY KEY (`device_id`, `module`, `mib`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Device to MIB mappings'; -CREATE TABLE IF NOT EXISTS `device_oids` ( `device_id` int(11) NOT NULL, `oid` varchar(255) NOT NULL, `module` varchar(255) NOT NULL, `mib` varchar(255) NOT NULL, `object_type` varchar(255) NOT NULL, `value` varchar(255), `numvalue` bigint, `last_modified` timestamp NOT NULL, PRIMARY KEY (`device_id`, `oid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Per-device MIB data'; -DELETE FROM `device_graphs`; -ALTER TABLE `device_graphs` CHANGE `graph` `graph` VARCHAR(255); diff --git a/sql-schema/086.sql b/sql-schema/086.sql deleted file mode 100644 index 629bb307c3..0000000000 --- a/sql-schema/086.sql +++ /dev/null @@ -1,3 +0,0 @@ -CREATE TABLE IF NOT EXISTS `stp` (`stp_id` int(11) NOT NULL, `device_id` int(11) NOT NULL, `rootBridge` tinyint(1) NOT NULL, `bridgeAddress` varchar(32) NOT NULL, `protocolSpecification` varchar(16) NOT NULL, `priority` mediumint(9) NOT NULL, `timeSinceTopologyChange` varchar(32) NOT NULL, `topChanges` mediumint(9) NOT NULL, `designatedRoot` varchar(32) NOT NULL, `rootCost` mediumint(9) NOT NULL, `rootPort` mediumint(9) NOT NULL, `maxAge` mediumint(9) NOT NULL, `helloTime` mediumint(9) NOT NULL, `holdTime` mediumint(9) NOT NULL, `forwardDelay` mediumint(9) NOT NULL, `bridgeMaxAge` smallint(6) NOT NULL, `bridgeHelloTime` smallint(6) NOT NULL, `bridgeForwardDelay` smallint(6) NOT NULL) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; -ALTER TABLE `stp` ADD PRIMARY KEY (`stp_id`), ADD KEY `stp_host` (`device_id`); -ALTER TABLE `stp` MODIFY `stp_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1; diff --git a/sql-schema/087.sql b/sql-schema/087.sql deleted file mode 100644 index 4febc49316..0000000000 --- a/sql-schema/087.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `notifications` ADD `datetime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP; diff --git a/sql-schema/088.sql b/sql-schema/088.sql deleted file mode 100644 index 48ce697f02..0000000000 --- a/sql-schema/088.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('oxidized.default_group','','','Set the default group returned','external',0,'oxidized',0,'0','0'),('oxidized.group_support','false','false','Enable the return of groups to Oxidized','external',0,'oxidized',0,'0','0'); diff --git a/sql-schema/089.sql b/sql-schema/089.sql deleted file mode 100644 index faeaea3535..0000000000 --- a/sql-schema/089.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `perf_times` ADD `poller` VARCHAR( 255 ) NOT NULL ; diff --git a/sql-schema/090.sql b/sql-schema/090.sql deleted file mode 100644 index dc08f0c671..0000000000 --- a/sql-schema/090.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('oxidized.reload_nodes','false','false','Reload Oxidized nodes list, each time a device is added','external',0,'oxidized',0,'0','0'); \ No newline at end of file diff --git a/sql-schema/091.sql b/sql-schema/091.sql deleted file mode 100644 index 855f864363..0000000000 --- a/sql-schema/091.sql +++ /dev/null @@ -1,4 +0,0 @@ -DROP TABLE IF EXISTS `component`; -CREATE TABLE `component` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID for each component, unique index', `device_id` int(11) unsigned NOT NULL COMMENT 'device_id from the devices table', `type` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT 'name from the component_type table', `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Display label for the component', `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'The status of the component, retreived from the device', `disabled` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Should this component be polled', `ignore` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Should this component be alerted on', `error` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Error message if in Alert state', PRIMARY KEY (`id`), KEY `device` (`device_id`), KEY `type` (`type`) ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='components attached to a device.'; -DROP TABLE IF EXISTS `component_prefs`; -CREATE TABLE `component_prefs` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID for each entry', `component` int(11) unsigned NOT NULL COMMENT 'id from the component table', `attribute` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Attribute for the Component', `value` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Value for the Component', PRIMARY KEY (`id`), KEY `component` (`component`), CONSTRAINT `component_prefs_ibfk_1` FOREIGN KEY (`component`) REFERENCES `component` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='AV Pairs for each component'; diff --git a/sql-schema/092.sql b/sql-schema/092.sql deleted file mode 100644 index 5400018f1c..0000000000 --- a/sql-schema/092.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `devices` ADD `ip` VARBINARY( 16 ) NOT NULL AFTER `sysName` ; diff --git a/sql-schema/093.sql b/sql-schema/093.sql deleted file mode 100644 index 6caaecf4e4..0000000000 --- a/sql-schema/093.sql +++ /dev/null @@ -1 +0,0 @@ -DELETE FROM `device_mibs` WHERE `module` = 'CISCO-AAA-SESSION-MIB' AND `mib` = 'ciscoAAASessionMIB'; diff --git a/sql-schema/094.sql b/sql-schema/094.sql deleted file mode 100644 index e9dc9c7777..0000000000 --- a/sql-schema/094.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE IF EXISTS `vmware_vminfo`; diff --git a/sql-schema/095.sql b/sql-schema/095.sql deleted file mode 100644 index f6a4af91e1..0000000000 --- a/sql-schema/095.sql +++ /dev/null @@ -1,3 +0,0 @@ -CREATE TABLE IF NOT EXISTS `ports_stp` (`port_stp_id` int(11) NOT NULL,`device_id` int(11) NOT NULL,`port_id` int(11) NOT NULL,`priority` tinyint(3) unsigned NOT NULL,`state` varchar(11) NOT NULL,`enable` varchar(8) NOT NULL,`pathCost` int(10) unsigned NOT NULL,`designatedRoot` varchar(32) NOT NULL,`designatedCost` smallint(5) unsigned NOT NULL,`designatedBridge` varchar(32) NOT NULL,`designatedPort` mediumint(9) NOT NULL,`forwardTransitions` int(10) unsigned NOT NULL) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; -ALTER TABLE `ports_stp` ADD PRIMARY KEY (`port_stp_id`), ADD UNIQUE KEY `device_id` (`device_id`,`port_id`); -ALTER TABLE `ports_stp` MODIFY `port_stp_id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1; diff --git a/sql-schema/096.sql b/sql-schema/096.sql deleted file mode 100644 index 58ae652013..0000000000 --- a/sql-schema/096.sql +++ /dev/null @@ -1,5 +0,0 @@ -CREATE TABLE IF NOT EXISTS `port_association_mode` (pom_id int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, name varchar(12) NOT NULL); -INSERT INTO port_association_mode (pom_id, name) values (1, 'ifIndex'); -INSERT INTO port_association_mode (name) values ('ifName'); -INSERT INTO port_association_mode (name) values ('ifDescr'); -ALTER TABLE devices ADD port_association_mode int(11) NOT NULL DEFAULT 1; diff --git a/sql-schema/097.sql b/sql-schema/097.sql deleted file mode 100644 index 02848dda9f..0000000000 --- a/sql-schema/097.sql +++ /dev/null @@ -1,2 +0,0 @@ -DELETE a1 FROM alerts a1, alerts a2 WHERE a1.id < a2.id AND a1.device_id = a2.device_id AND a1.rule_id = a2.rule_id; -ALTER TABLE `alerts` ADD UNIQUE `unique_alert`(`device_id`, `rule_id`); \ No newline at end of file diff --git a/sql-schema/098.sql b/sql-schema/098.sql deleted file mode 100644 index f9a25728fd..0000000000 --- a/sql-schema/098.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `bgpPeers_cbgp` ADD `AcceptedPrefixes_delta` INT NOT NULL ,ADD `AcceptedPrefixes_prev` INT NOT NULL ,ADD `DeniedPrefixes_delta` INT NOT NULL ,ADD `DeniedPrefixes_prev` INT NOT NULL ,ADD `AdvertisedPrefixes_delta` INT NOT NULL ,ADD `AdvertisedPrefixes_prev` INT NOT NULL ,ADD `SuppressedPrefixes_delta` INT NOT NULL ,ADD `SuppressedPrefixes_prev` INT NOT NULL ,ADD `WithdrawnPrefixes_delta` INT NOT NULL ,ADD `WithdrawnPrefixes_prev` INT NOT NULL ; diff --git a/sql-schema/099.sql b/sql-schema/099.sql deleted file mode 100644 index 814d2abc91..0000000000 --- a/sql-schema/099.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `ports` ADD `ifOperStatus_prev` VARCHAR( 16 ) NULL AFTER `ifOperStatus` ; -ALTER TABLE `ports` ADD `ifAdminStatus_prev` VARCHAR( 16 ) NULL AFTER `ifAdminStatus` ; diff --git a/sql-schema/100.sql b/sql-schema/100.sql deleted file mode 100644 index 646e4c4e1a..0000000000 --- a/sql-schema/100.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO port_association_mode (name) values ('ifAlias'); diff --git a/sql-schema/1000.sql b/sql-schema/1000.sql deleted file mode 100644 index eafac21531..0000000000 --- a/sql-schema/1000.sql +++ /dev/null @@ -1,130 +0,0 @@ -CREATE TABLE IF NOT EXISTS migrations (id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, migration VARCHAR(255) NOT NULL, batch INT NOT NULL); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_access_points_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_alert_device_map_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_alert_group_map_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_alert_log_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_alert_rules_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_alert_schedulables_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_alert_schedule_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_alert_template_map_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_alert_templates_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_alert_transport_groups_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_alert_transport_map_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_alert_transports_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_alerts_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_api_tokens_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_application_metrics_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_applications_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_authlog_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_bgpPeers_cbgp_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_bgpPeers_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_bill_data_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_bill_history_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_bill_perms_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_bill_port_counters_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_bill_ports_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_bills_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_callback_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_cef_switching_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_ciscoASA_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_component_prefs_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_component_statuslog_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_component_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_config_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_customers_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_dashboards_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_dbSchema_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_device_graphs_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_device_group_device_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_device_groups_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_device_mibs_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_device_oids_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_device_perf_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_device_relationships_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_devices_attribs_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_devices_perms_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_devices_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_entPhysical_state_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_entPhysical_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_entityState_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_eventlog_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_graph_types_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_hrDevice_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_ipsec_tunnels_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_ipv4_addresses_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_ipv4_mac_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_ipv4_networks_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_ipv6_addresses_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_ipv6_networks_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_juniAtmVp_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_links_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_loadbalancer_rservers_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_loadbalancer_vservers_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_locations_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_mac_accounting_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_mefinfo_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_mempools_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_mibdefs_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_munin_plugins_ds_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_munin_plugins_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_netscaler_vservers_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_notifications_attribs_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_notifications_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_ospf_areas_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_ospf_instances_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_ospf_nbrs_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_ospf_ports_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_packages_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_pdb_ix_peers_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_pdb_ix_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_perf_times_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_plugins_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_poller_cluster_stats_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_poller_cluster_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_poller_groups_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_pollers_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_ports_adsl_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_ports_fdb_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_ports_nac_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_ports_perms_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_ports_stack_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_ports_statistics_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_ports_stp_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_ports_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_ports_vlans_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_processes_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_processors_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_proxmox_ports_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_proxmox_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_pseudowires_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_route_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_sensors_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_sensors_to_state_indexes_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_services_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_session_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_slas_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_state_indexes_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_state_translations_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_storage_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_stp_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_syslog_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_tnmsneinfo_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_toner_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_transport_group_transport_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_ucd_diskio_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_users_prefs_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_users_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_users_widgets_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_vlans_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_vminfo_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_vrf_lite_cisco_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_vrfs_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_widgets_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091314_create_wireless_sensors_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091322_add_foreign_keys_to_component_prefs_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091322_add_foreign_keys_to_component_statuslog_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091322_add_foreign_keys_to_device_group_device_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091322_add_foreign_keys_to_device_relationships_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091322_add_foreign_keys_to_sensors_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091322_add_foreign_keys_to_sensors_to_state_indexes_table', 1); -INSERT INTO migrations (migration, batch) VALUES ('2018_07_03_091322_add_foreign_keys_to_wireless_sensors_table', 1); diff --git a/sql-schema/101.sql b/sql-schema/101.sql deleted file mode 100644 index d354355534..0000000000 --- a/sql-schema/101.sql +++ /dev/null @@ -1,18 +0,0 @@ -CREATE TABLE IF NOT EXISTS `vrf_lite_cisco` ( `vrf_lite_cisco_id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `context_name` varchar(128) CHARACTER SET utf8 collate utf8_general_ci not null ,`intance_name` varchar(128) DEFAULT '', `vrf_name` varchar(128) DEFAULT 'Default', PRIMARY KEY (`vrf_lite_cisco_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -ALTER TABLE `vrf_lite_cisco` ADD INDEX `vrf` (`vrf_name` ASC), ADD INDEX `context` (`context_name` ASC), ADD INDEX `device` (`device_id` ASC), ADD INDEX `mix` (`device_id` ASC, `context_name` ASC, `vrf_name` ASC); -ALTER TABLE ipv4_addresses ADD `context_name` varchar(128) CHARACTER SET utf8 collate utf8_general_ci ; -ALTER TABLE ipv4_networks ADD `context_name` varchar(128) CHARACTER SET utf8 collate utf8_general_ci ; -ALTER TABLE ipv4_mac ADD `context_name` varchar(128) CHARACTER SET utf8 collate utf8_general_ci ; -ALTER TABLE ipv6_addresses ADD `context_name` varchar(128) CHARACTER SET utf8 collate utf8_general_ci ; -ALTER TABLE ipv6_networks ADD `context_name` varchar(128) CHARACTER SET utf8 collate utf8_general_ci ; -ALTER TABLE bgpPeers ADD `context_name` varchar(128) CHARACTER SET utf8 collate utf8_general_ci ; -ALTER TABLE bgpPeers_cbgp ADD `context_name` varchar(128) CHARACTER SET utf8 collate utf8_general_ci ; -ALTER TABLE ospf_areas ADD `context_name` varchar(128) CHARACTER SET utf8 collate utf8_general_ci ; -ALTER TABLE ospf_areas DROP INDEX device_area, ADD UNIQUE KEY `device_area` (`device_id`,`ospfAreaId`,`context_name`); -ALTER TABLE ospf_instances ADD `context_name` varchar(128) CHARACTER SET utf8 collate utf8_general_ci ; -ALTER TABLE ospf_instances DROP INDEX device_id, ADD UNIQUE KEY `device_id` (`device_id`,`ospf_instance_id`,`context_name`); -ALTER TABLE ospf_nbrs ADD `context_name` varchar(128) CHARACTER SET utf8 collate utf8_general_ci ; -ALTER TABLE ospf_nbrs DROP INDEX device_id, ADD UNIQUE KEY `device_id` (`device_id`,`ospf_nbr_id`,`context_name`); -ALTER TABLE ospf_ports ADD `context_name` varchar(128) CHARACTER SET utf8 collate utf8_general_ci ; -ALTER TABLE ospf_ports DROP INDEX device_id, ADD UNIQUE KEY `device_id` (`device_id`,`ospf_port_id`,`context_name`); -ALTER TABLE `vlans` CHANGE COLUMN `vlan_name` `vlan_name` VARCHAR(64) DEFAULT NULL; diff --git a/sql-schema/102.sql b/sql-schema/102.sql deleted file mode 100644 index c1f56b5f65..0000000000 --- a/sql-schema/102.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO `config` (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_group_order`,`config_sub_group`,`config_sub_group_order`,`config_hidden`,`config_disabled`) VALUES ('webui.global_search_result_limit','8','8','Global search results limit','webui',0,'search',0,'1','0'); diff --git a/sql-schema/103.sql b/sql-schema/103.sql deleted file mode 100644 index 05a2e54374..0000000000 --- a/sql-schema/103.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `stp` CHANGE `timeSinceTopologyChange` `timeSinceTopologyChange` INT UNSIGNED NOT NULL; diff --git a/sql-schema/104.sql b/sql-schema/104.sql deleted file mode 100644 index 6a433b371d..0000000000 --- a/sql-schema/104.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `devices` CHANGE `purpose` `purpose` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL; diff --git a/sql-schema/105.sql b/sql-schema/105.sql deleted file mode 100644 index 70f4286357..0000000000 --- a/sql-schema/105.sql +++ /dev/null @@ -1,6 +0,0 @@ -CREATE TABLE IF NOT EXISTS `state_indexes` ( `state_index_id` int(11) NOT NULL AUTO_INCREMENT, `state_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`state_index_id`), UNIQUE KEY `state_name` (`state_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1; -CREATE TABLE IF NOT EXISTS `state_translations` ( `state_translation_id` int(11) NOT NULL AUTO_INCREMENT, `state_index_id` int(11) NOT NULL, `state_descr` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, `state_draw_graph` tinyint(1) NOT NULL, `state_value` tinyint(1) NOT NULL, `state_generic_value` tinyint(1) NOT NULL, `state_lastupdated` timestamp NOT NULL, PRIMARY KEY (`state_translation_id`), UNIQUE KEY `state_index_id_value` (`state_index_id`,`state_value`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1; -CREATE TABLE IF NOT EXISTS `sensors_to_state_indexes` ( `sensors_to_state_translations_id` int(11) NOT NULL AUTO_INCREMENT, `sensor_id` int(11) NOT NULL, `state_index_id` int(11) NOT NULL, PRIMARY KEY (`sensors_to_state_translations_id`), UNIQUE KEY `sensor_id_state_index_id` (`sensor_id`,`state_index_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1; -ALTER TABLE `sensors_to_state_indexes` ADD FOREIGN KEY (`sensor_id`) REFERENCES `sensors`(`sensor_id`) ON DELETE RESTRICT ON UPDATE RESTRICT; -ALTER TABLE `sensors_to_state_indexes` ADD FOREIGN KEY (`state_index_id`) REFERENCES `state_indexes`(`state_index_id`) ON DELETE RESTRICT ON UPDATE RESTRICT; -ALTER TABLE `sensors` ADD `sensor_prev` float default NULL; diff --git a/sql-schema/106.sql b/sql-schema/106.sql deleted file mode 100644 index 0960191165..0000000000 --- a/sql-schema/106.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE port_in_measurements ADD INDEX (`port_id`, `timestamp`); -ALTER TABLE port_out_measurements ADD INDEX (`port_id`, `timestamp`); -ALTER TABLE bill_data ADD INDEX (`bill_id`, `timestamp`); diff --git a/sql-schema/107.sql b/sql-schema/107.sql deleted file mode 100644 index 6c44ea5b6b..0000000000 --- a/sql-schema/107.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE bill_port_counters_tmp(port_id int NOT NULL PRIMARY KEY, `timestamp` timestamp NOT NULL DEFAULT current_timestamp, in_counter bigint, in_delta bigint NOT NULL DEFAULT 0, out_counter bigint, out_delta bigint NOT NULL DEFAULT 0); -INSERT INTO bill_port_counters_tmp(port_id, timestamp, in_counter, out_counter) SELECT q.port_id, q.max_timestamp, max(i.counter), max(o.counter) FROM (SELECT port_id, MAX(`timestamp`) AS max_timestamp FROM port_in_measurements GROUP BY port_id) q INNER JOIN port_in_measurements i ON q.port_id = i.port_id AND q.max_timestamp = i.timestamp INNER JOIN port_out_measurements o ON q.port_id = o.port_id AND q.max_timestamp = o.timestamp GROUP BY q.port_id, q.max_timestamp; -RENAME TABLE bill_port_counters_tmp TO bill_port_counters; -ALTER TABLE bill_data ADD id int NOT NULL PRIMARY KEY AUTO_INCREMENT FIRST; -DELETE bill_data FROM bill_data INNER JOIN (SELECT bill_id, timestamp, MIN(id) as first_id FROM bill_data GROUP BY bill_id, timestamp HAVING COUNT(id) > 1) q ON bill_data.bill_id = q.bill_id AND bill_data.timestamp = q.timestamp; -ALTER TABLE bill_data DROP id; -ALTER TABLE bill_data ADD PRIMARY KEY (bill_id, timestamp); -ALTER TABLE bill_data DROP INDEX bill_id_2; -DROP TABLE port_in_measurements; -DROP TABLE port_out_measurements; diff --git a/sql-schema/108.sql b/sql-schema/108.sql deleted file mode 100644 index 670badd789..0000000000 --- a/sql-schema/108.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('email_html', 'false', 'false', 'Send HTML emails', 'alerting',0,'general',0,'0','0'); diff --git a/sql-schema/109.sql b/sql-schema/109.sql deleted file mode 100644 index a6bca66b56..0000000000 --- a/sql-schema/109.sql +++ /dev/null @@ -1,5 +0,0 @@ -CREATE TABLE tmp_table LIKE config; -ALTER IGNORE TABLE tmp_table ADD UNIQUE INDEX uniqueindex_configname (config_name); -INSERT IGNORE INTO tmp_table SELECT * FROM config; -DROP TABLE config; -RENAME TABLE tmp_table TO config; diff --git a/sql-schema/110.sql b/sql-schema/110.sql deleted file mode 100644 index 43ce2fe1c6..0000000000 --- a/sql-schema/110.sql +++ /dev/null @@ -1,4 +0,0 @@ -INSERT INTO `config` (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_group_order`,`config_sub_group`,`config_sub_group_order`,`config_hidden`,`config_disabled`) VALUES ('alert.transports.canopsis.user','','','Canopsis User','alerting',0, 'transports', 0, '0', '0'); -INSERT INTO `config` (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_group_order`,`config_sub_group`,`config_sub_group_order`,`config_hidden`,`config_disabled`) VALUES ('alert.transports.canopsis.passwd','','','Canopsis Password','alerting',0, 'transports', 0, '0', '0'); -INSERT INTO `config` (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_group_order`,`config_sub_group`,`config_sub_group_order`,`config_hidden`,`config_disabled`) VALUES ('alert.transports.canopsis.host','','','Canopsis Hostname','alerting',0, 'transports', 0, '0', '0'); -INSERT INTO `config` (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_group_order`,`config_sub_group`,`config_sub_group_order`,`config_hidden`,`config_disabled`) VALUES ('alert.transports.canopsis.vhost','','','Canopsis vHost','alerting',0, 'transports', 0, '0', '0'); diff --git a/sql-schema/111.sql b/sql-schema/111.sql deleted file mode 100644 index adfb3b6967..0000000000 --- a/sql-schema/111.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO config (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_group_order`,`config_sub_group`,`config_sub_group_order`,`config_hidden`,`config_disabled`) VALUES ('alert.transports.canopsis.port','','','Canopsis Port number','alerting',0, 'transports', 0, '0', '0'); diff --git a/sql-schema/112.sql b/sql-schema/112.sql deleted file mode 100644 index 3556225abd..0000000000 --- a/sql-schema/112.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `services` ADD `service_ds` VARCHAR(255) NOT NULL COMMENT 'Data Sources available for this service'; -ALTER TABLE `services` DROP `service_checked`; diff --git a/sql-schema/113.sql b/sql-schema/113.sql deleted file mode 100644 index 3ed214a7a5..0000000000 --- a/sql-schema/113.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE IF NOT EXISTS `route` ( `device_id` int(11) NOT NULL, `context_name` varchar(128) CHARACTER SET utf8 collate utf8_general_ci not null, `ipRouteDest` varchar(256) not null, `ipRouteIfIndex` varchar(256), `ipRouteMetric` varchar(256) not null, `ipRouteNextHop` varchar(256) not null, `ipRouteType` varchar(256) not null, `ipRouteProto` varchar(256) not null, `discoveredAt` int(11) NOT NULL, `ipRouteMask` varchar(256) not null, INDEX `device` (`device_id` ASC, `context_name` ASC, `ipRouteDest`(255) ASC, `ipRouteNextHop` (255) ASC) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/sql-schema/114.sql b/sql-schema/114.sql deleted file mode 100644 index 7b245ccc6e..0000000000 --- a/sql-schema/114.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO `config` (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_group_order`,`config_sub_group`,`config_sub_group_order`,`config_hidden`,`config_disabled`) VALUES ('webui.min_graph_height','300','300','Minimum Graph Height','webui',0,'graph',0,'1','0'); \ No newline at end of file diff --git a/sql-schema/115.sql b/sql-schema/115.sql deleted file mode 100644 index c4ef10ab83..0000000000 --- a/sql-schema/115.sql +++ /dev/null @@ -1,2 +0,0 @@ -UPDATE `config` SET `config_value` = '((%ports.ifInOctets_rate*8) / %ports.ifSpeed)*100' WHERE `config_value` = '((%ports.ifInOctets_rate*8)/%ports.ifSpeed)*100'; -UPDATE `config` SET `config_default` = '((%ports.ifInOctets_rate*8) / %ports.ifSpeed)*100' WHERE `config_default` = '((%ports.ifInOctets_rate*8)/%ports.ifSpeed)*100'; diff --git a/sql-schema/116.sql b/sql-schema/116.sql deleted file mode 100644 index 800a240246..0000000000 --- a/sql-schema/116.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `devices` CHANGE `device_id` `device_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT; -ALTER TABLE `device_groups` CHANGE `id` `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT; -CREATE TABLE `device_group_device` (`device_group_id` int(10) unsigned NOT NULL, `device_id` int(10) unsigned NOT NULL, PRIMARY KEY (`device_group_id`,`device_id`), KEY `device_group_device_device_group_id_index` (`device_group_id`), KEY `device_group_device_device_id_index` (`device_id`), CONSTRAINT `device_group_device_device_group_id_foreign` FOREIGN KEY (`device_group_id`) REFERENCES `device_groups` (`id`) ON DELETE CASCADE, CONSTRAINT `device_group_device_device_id_foreign` FOREIGN KEY (`device_id`) REFERENCES `devices` (`device_id`) ON DELETE CASCADE); diff --git a/sql-schema/117.sql b/sql-schema/117.sql deleted file mode 100644 index a7f9f6ad85..0000000000 --- a/sql-schema/117.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE alert_rules ADD COLUMN proc VARCHAR(80) AFTER name; diff --git a/sql-schema/118.sql b/sql-schema/118.sql deleted file mode 100644 index 9c9674eb11..0000000000 --- a/sql-schema/118.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `eventlog` ADD `device_id` INT NOT NULL AFTER `host` ; -ALTER TABLE `eventlog` ADD INDEX ( `device_id` ) ; -UPDATE eventlog SET device_id=host WHERE device_id=0; diff --git a/sql-schema/119.sql b/sql-schema/119.sql deleted file mode 100644 index c22ce565b5..0000000000 --- a/sql-schema/119.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `ports` CHANGE `ifIndex` `ifIndex` BIGINT(20) NULL DEFAULT '0'; diff --git a/sql-schema/120.sql b/sql-schema/120.sql deleted file mode 100644 index 20477847d5..0000000000 --- a/sql-schema/120.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `ports` CHANGE `ifInOctets_rate` `ifInOctets_rate` BIGINT(20) NULL DEFAULT NULL, CHANGE `ifOutOctets_rate` `ifOutOctets_rate` BIGINT(20) NULL DEFAULT NULL ; diff --git a/sql-schema/121.sql b/sql-schema/121.sql deleted file mode 100644 index fc5646afd3..0000000000 --- a/sql-schema/121.sql +++ /dev/null @@ -1,8 +0,0 @@ -DELETE FROM `sensors_to_state_indexes` WHERE `sensors_to_state_indexes`.`sensor_id` NOT IN (SELECT DISTINCT `sensors`.`sensor_id` FROM `sensors` INNER JOIN `devices` ON `sensors`.`device_id` = `devices`.`device_id`); -DELETE FROM `sensors` WHERE `sensors`.`device_id` NOT IN (SELECT `device_id` FROM `devices`); -DELETE FROM `state_indexes` WHERE `state_indexes`.`state_index_id` NOT IN (SELECT `sensors_to_state_indexes`.`state_index_id` FROM `sensors_to_state_indexes`); -DELETE FROM `state_translations` WHERE `state_translations`.`state_index_id` NOT IN (SELECT `state_indexes`.`state_index_id` FROM `state_indexes`); - -ALTER TABLE `sensors` CHANGE `device_id` `device_id` INT(11) UNSIGNED NOT NULL DEFAULT '0'; -ALTER TABLE `sensors` ADD CONSTRAINT `sensors_device_id_foreign` FOREIGN KEY (`device_id`) REFERENCES `devices` (`device_id`) ON DELETE CASCADE; -ALTER TABLE `sensors_to_state_indexes` ADD CONSTRAINT `sensors_to_state_indexes_sensor_id_foreign` FOREIGN KEY (`sensor_id`) REFERENCES `sensors` (`sensor_id`) ON DELETE CASCADE; \ No newline at end of file diff --git a/sql-schema/122.sql b/sql-schema/122.sql deleted file mode 100644 index 1610949a10..0000000000 --- a/sql-schema/122.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `sensors_to_state_indexes` DROP FOREIGN KEY `sensors_to_state_indexes_ibfk_1`; -ALTER TABLE `sensors_to_state_indexes` DROP FOREIGN KEY `sensors_to_state_indexes_sensor_id_foreign`; -ALTER TABLE `sensors_to_state_indexes` ADD CONSTRAINT `sensors_to_state_indexes_sensor_id_foreign` FOREIGN KEY (`sensor_id`) REFERENCES `sensors` (`sensor_id`) ON DELETE CASCADE; diff --git a/sql-schema/123.sql b/sql-schema/123.sql deleted file mode 100644 index 57c1f1875e..0000000000 --- a/sql-schema/123.sql +++ /dev/null @@ -1,3 +0,0 @@ -INSERT INTO `alert_templates` (`name`, `template`) VALUES ('BGP Sessions.', '{{ $alert->title }}\nSeverity: {{ $alert->severity }}\n @if ($alert->state == 0) Time elapsed: {{ $alert->elapsed }}\r\n @endif\nTimestamp: {{ $alert->timestamp }}\nUnique-ID: {{ $alert->uid }}\nRule: @if ($alert->name) {{ $alert->name }} @else {{ $alert->rule }} @endif \n @if ($alert->faults) Faults:\n @foreach ($alert->faults as $key => $value)\n#{{ $key }}: {{ $value[\'string\'] }}\nPeer: {{ $value[\'astext\'] }}\nPeer IP: {{ $value[\'bgpPeerIdentifier\'] }}\nPeer AS: {{ $value[\'bgpPeerRemoteAs\'] }}\nPeer EstTime: {{ $value[\'bgpPeerFsmEstablishedTime\'] }}\nPeer State: {{ $value[\'bgpPeerState\'] }}\n @endforeach\n @endif'); -INSERT INTO `alert_templates` (`name`, `template`) VALUES ('Ports', '{{ $alert->title }}\nSeverity: {{ $alert->severity }}\n @if ($alert->state == 0) Time elapsed: {{ $alert->elapsed }} @endif\nTimestamp: {{ $alert->timestamp }}\nUnique-ID: {{ $alert->uid }}\nRule: @if ($alert->name) {{ $alert->name }} @else {{ $alert->rule }} @endif \n @if ($alert->faults) Faults:\n @foreach ($alert->faults as $key => $value)\n#{{ $key }}: {{ $value[\'string\'] }}\nPort: {{ $value[\'ifName\'] }}\nPort Name: {{ $value[\'ifAlias\'] }}\nPort Status: {{ $value[\'message\'] }}\n @endforeach \n @endif'); -INSERT INTO `alert_templates` (`name`, `template`) VALUES ('Temperature', '{{ $alert->title }}\nSeverity: {{ $alert->severity }}\n @if ($alert->state == 0) Time elapsed: {{ $alert->elapsed }} @endif \nTimestamp: {{ $alert->timestamp }}\nUnique-ID: {{ $alert->uid }}\nRule: @if ($alert->name) {{ $alert->name }} @else {{ $alert->rule }} @endif \n @if ($alert->faults) Faults:\n @foreach ($alert->faults as $key => $value)\n#{{ $key }}: {{ $value[\'string\'] }}\nTemperature: {{ $value[\'sensor_current\'] }}\nPrevious Measurement: {{ $value[\'sensor_prev\'] }}\n @endforeach \n @endif'); diff --git a/sql-schema/124.sql b/sql-schema/124.sql deleted file mode 100644 index 0a4d0b8da8..0000000000 --- a/sql-schema/124.sql +++ /dev/null @@ -1,2 +0,0 @@ -CREATE TABLE IF NOT EXISTS `device_groups` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL DEFAULT '', `desc` varchar(255) NOT NULL DEFAULT '', `pattern` text, PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`)) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1; -CREATE TABLE IF NOT EXISTS `device_group_device` ( `device_group_id` int(10) unsigned NOT NULL, `device_id` int(10) unsigned NOT NULL, PRIMARY KEY (`device_group_id`,`device_id`), KEY `device_group_device_device_group_id_index` (`device_group_id`), KEY `device_group_device_device_id_index` (`device_id`), CONSTRAINT `device_group_device_device_group_id_foreign` FOREIGN KEY (`device_group_id`) REFERENCES `device_groups` (`id`) ON DELETE CASCADE, CONSTRAINT `device_group_device_device_id_foreign` FOREIGN KEY (`device_id`) REFERENCES `devices` (`device_id`) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=latin1; diff --git a/sql-schema/125.sql b/sql-schema/125.sql deleted file mode 100644 index ea7bdf31cf..0000000000 --- a/sql-schema/125.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `bill_port_counters` ADD `bill_id` INT NOT NULL ; -ALTER TABLE `bill_port_counters` DROP PRIMARY KEY, ADD PRIMARY KEY ( `port_id` , `bill_id` ); diff --git a/sql-schema/126.sql b/sql-schema/126.sql deleted file mode 100644 index cf545a3a2c..0000000000 --- a/sql-schema/126.sql +++ /dev/null @@ -1,6 +0,0 @@ -DROP TABLE IF EXISTS `component_statuslog`; -CREATE TABLE `component_statuslog` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID for each log entry, unique index', `component_id` int(11) unsigned NOT NULL COMMENT 'id from the component table', `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'The status that the component was changed TO', `timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'When the status of the component was changed', PRIMARY KEY (`id`), KEY `device` (`component_id`), CONSTRAINT `component_statuslog_ibfk_1` FOREIGN KEY (`component_id`) REFERENCES `component` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='log of status changes to a component.'; -ALTER TABLE `component` CHANGE `status` `status` TINYINT(1) NOT NULL DEFAULT '0' COMMENT 'The status of the component, retreived from the device'; -UPDATE component SET status=2 WHERE status=0; -UPDATE component SET status=0 WHERE status=1; -INSERT INTO `widgets` (`widget_title`,`widget`,`base_dimensions`) VALUES ('Component Status','component-status','3,2'); diff --git a/sql-schema/127.sql b/sql-schema/127.sql deleted file mode 100644 index 902091df86..0000000000 --- a/sql-schema/127.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `slas` ADD `opstatus` TINYINT(1) NOT NULL DEFAULT '0' AFTER `status`; diff --git a/sql-schema/128.sql b/sql-schema/128.sql deleted file mode 100644 index 8fa2cb3727..0000000000 --- a/sql-schema/128.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `applications` SET `app_type` = 'ntpd' WHERE `applications`.`app_type` = 'ntpd-server'; \ No newline at end of file diff --git a/sql-schema/129.sql b/sql-schema/129.sql deleted file mode 100644 index 89272df6b6..0000000000 --- a/sql-schema/129.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO `config` (`config_name`, `config_value`, `config_default`, `config_descr`, `config_group`, `config_group_order`, `config_sub_group`, `config_sub_group_order`, `config_hidden`, `config_disabled`) VALUES('webui.old_availability_map', 'false', 'false', 'Availability map old view', 'webui', 0, 'graph', 0, '1', '0'); - diff --git a/sql-schema/130.sql b/sql-schema/130.sql deleted file mode 100644 index 6c91c60ef0..0000000000 --- a/sql-schema/130.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO `config` (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_group_order`,`config_sub_group`,`config_sub_group_order`,`config_hidden`,`config_disabled`) VALUES ('webui.default_dashboard_id','0','0','Global default dashboard_id for all users who do not have their own default set','webui',0,'dashboard',0,'0','0'); diff --git a/sql-schema/131.sql b/sql-schema/131.sql deleted file mode 100644 index a7e115b6bf..0000000000 --- a/sql-schema/131.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO `config` (`config_name`, `config_value`, `config_default`, `config_descr`, `config_group`, `config_group_order`, `config_sub_group`, `config_sub_group_order`, `config_hidden`, `config_disabled`) VALUES('webui.availability_map_sort_status', 'false', 'false', 'Sort devices by status', 'webui', 0, 'graph', 0, '1', '0'); diff --git a/sql-schema/132.sql b/sql-schema/132.sql deleted file mode 100644 index 29bd944016..0000000000 --- a/sql-schema/132.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO `config` (`config_name`, `config_value`, `config_default`, `config_descr`, `config_group`, `config_group_order`, `config_sub_group`, `config_sub_group_order`, `config_hidden`, `config_disabled`) VALUES('webui.availability_map_use_device_groups', 'false', 'false', 'Use device groups filter', 'webui', 0, 'graph', 0, '0', '0'); diff --git a/sql-schema/133.sql b/sql-schema/133.sql deleted file mode 100644 index cd92cc468d..0000000000 --- a/sql-schema/133.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `session` ADD UNIQUE(`session_value`); diff --git a/sql-schema/134.sql b/sql-schema/134.sql deleted file mode 100644 index b4e3fc51e1..0000000000 --- a/sql-schema/134.sql +++ /dev/null @@ -1,2 +0,0 @@ -DELETE FROM `dbSchema`; -INSERT INTO `dbSchema` (`version`) VALUES ('134'); diff --git a/sql-schema/135.sql b/sql-schema/135.sql deleted file mode 100644 index 2af50737b6..0000000000 --- a/sql-schema/135.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE state_translations MODIFY state_value SMALLINT(5) UNSIGNED NOT NULL; diff --git a/sql-schema/136.sql b/sql-schema/136.sql deleted file mode 100644 index 4b1b628150..0000000000 --- a/sql-schema/136.sql +++ /dev/null @@ -1,2 +0,0 @@ -UPDATE `ports` SET `ifLastChange` = 0; -ALTER TABLE `ports` CHANGE `ifLastChange` `ifLastChange` INT NOT NULL DEFAULT 0; diff --git a/sql-schema/137.sql b/sql-schema/137.sql deleted file mode 100644 index f5a311d2ab..0000000000 --- a/sql-schema/137.sql +++ /dev/null @@ -1,4 +0,0 @@ -INSERT INTO `config` (`config_name`, `config_value`, `config_default`, `config_descr`, `config_group`, `config_group_order`, `config_sub_group`, `config_sub_group_order`, `config_hidden`, `config_disabled`) VALUES('webui.availability_map_box_size', '165', '165', 'Input desired tile width in pixels for box size in full view', 'webui', 0, 'graph', 0, '0', '0'); -UPDATE `config` SET `config_hidden` = '0', `config_descr` = 'Sort devices and services by status' WHERE `config_name` = 'webui.availability_map_sort_status'; -UPDATE `config` SET `config_descr` = 'Enable usage of device groups filter' WHERE `config_name` = 'webui.availability_map_use_device_groups'; -UPDATE `config` SET `config_name` = 'webui.availability_map_compact', `config_hidden` = '0' WHERE `config_name` = 'webui.old_availability_map'; diff --git a/sql-schema/138.sql b/sql-schema/138.sql deleted file mode 100644 index 8a8ae1ff47..0000000000 --- a/sql-schema/138.sql +++ /dev/null @@ -1,2 +0,0 @@ -UPDATE `config` SET `config_name` = 'webui.availability_map_compact', `config_hidden` = '0' WHERE `config_name` = 'webui.availability_map_old'; -UPDATE `widgets` SET `base_dimensions` = '6,3'; diff --git a/sql-schema/139.sql b/sql-schema/139.sql deleted file mode 100644 index 6ac428bcb6..0000000000 --- a/sql-schema/139.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `device_groups` ADD `params` TEXT NULL DEFAULT NULL AFTER `pattern`; diff --git a/sql-schema/140.sql b/sql-schema/140.sql deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sql-schema/141.sql b/sql-schema/141.sql deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sql-schema/142.sql b/sql-schema/142.sql deleted file mode 100644 index 29d25d4764..0000000000 --- a/sql-schema/142.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `packages` MODIFY `version` varchar(255) NOT NULL; diff --git a/sql-schema/143.sql b/sql-schema/143.sql deleted file mode 100644 index 8ccd5088eb..0000000000 --- a/sql-schema/143.sql +++ /dev/null @@ -1,20 +0,0 @@ -UPDATE `sensors` SET `sensor_oid` = REPLACE(`sensor_oid`, '1.3.6.1.', '.1.3.6.1.') WHERE `sensor_oid` LIKE '1.3.6.1.%'; -UPDATE `sensors` SET `sensor_oid` = REPLACE(`sensor_oid`, 'GAMATRONIC-MIB::gamatronicLTD', '.1.3.6.1.4.1.6050') WHERE `sensor_oid` LIKE 'GAMATRONIC-MIB::gamatronicLTD%'; -UPDATE `sensors` SET `sensor_oid` = REPLACE(`sensor_oid`, 'NMS-IF-MIB::curr', '.1.3.6.1.4.1.11606.10.9.63.1.7.1.6') WHERE `sensor_oid` LIKE 'NMS-IF-MIB::curr%'; -UPDATE `sensors` SET `sensor_oid` = REPLACE(`sensor_oid`, 'NMS-IF-MIB::rxPower', '.1.3.6.1.4.1.11606.10.9.63.1.7.1.3') WHERE `sensor_oid` LIKE 'NMS-IF-MIB::rxPower%'; -UPDATE `sensors` SET `sensor_oid` = REPLACE(`sensor_oid`, 'NMS-IF-MIB::txPower', '.1.3.6.1.4.1.11606.10.9.63.1.7.1.2') WHERE `sensor_oid` LIKE 'NMS-IF-MIB::txPower%'; -UPDATE `sensors` SET `sensor_oid` = REPLACE(`sensor_oid`, 'ifSfpParameterTable', '.1.3.6.1.4.1.11606.10.9.63.1.7') WHERE `sensor_oid` LIKE 'ifSfpParameterTable%'; -UPDATE `sensors` SET `sensor_oid` = REPLACE(`sensor_oid`, 'PowerNet-MIB::upsAdvBatteryRunTimeRemaining', '.1.3.6.1.4.1.318.1.1.1.2.2.3') WHERE `sensor_oid` LIKE 'PowerNet-MIB::upsAdvBatteryRunTimeRemaining%'; -UPDATE `sensors` SET `sensor_oid` = REPLACE(`sensor_oid`, 'receivePower', '.1.3.6.1.4.1.17713.7.12.2') WHERE `sensor_oid` LIKE 'receivePower%'; -UPDATE `sensors` SET `sensor_oid` = REPLACE(`sensor_oid`, 'cambiumSTADLRSSI', '.1.3.6.1.4.1.17713.21.1.2.3') WHERE `sensor_oid` LIKE 'cambiumSTADLRSSI%'; -UPDATE `sensors` SET `sensor_oid` = REPLACE(`sensor_oid`, 'lastPowerLevel', '.1.3.6.1.4.1.17713.21.1.2.3') WHERE `sensor_oid` LIKE 'lastPowerLevel%'; -UPDATE `sensors` SET `sensor_oid` = REPLACE(`sensor_oid`, 'radioDbmInt', '.1.3.6.1.4.1.161.19.3.2.2.21') WHERE `sensor_oid` LIKE 'radioDbmInt%'; -UPDATE `sensors` SET `sensor_oid` = REPLACE(`sensor_oid`, 'airIRRCUnitStatusRackInletTempMetric', '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.7') WHERE `sensor_oid` LIKE 'airIRRCUnitStatusRackInletTempMetric%'; -UPDATE `sensors` SET `sensor_oid` = REPLACE(`sensor_oid`, 'airIRRCUnitStatusSupplyAirTempMetric', '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.9') WHERE `sensor_oid` LIKE 'airIRRCUnitStatusSupplyAirTempMetric%'; -UPDATE `sensors` SET `sensor_oid` = REPLACE(`sensor_oid`, 'airIRRCUnitStatusReturnAirTempMetric', '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.11') WHERE `sensor_oid` LIKE 'airIRRCUnitStatusReturnAirTempMetric%'; -UPDATE `sensors` SET `sensor_oid` = REPLACE(`sensor_oid`, 'airIRRCUnitStatusEnteringFluidTemperatureMetric', '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.24') WHERE `sensor_oid` LIKE 'airIRRCUnitStatusEnteringFluidTemperatureMetric%'; -UPDATE `sensors` SET `sensor_oid` = REPLACE(`sensor_oid`, 'airIRRCUnitStatusLeavingFluidTemperatureMetric', '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.26') WHERE `sensor_oid` LIKE 'airIRRCUnitStatusLeavingFluidTemperatureMetric%'; -UPDATE `sensors` SET `sensor_oid` = REPLACE(`sensor_oid`, 'boxTemperatureC', '.1.3.6.1.4.1.161.19.3.3.1.35') WHERE `sensor_oid` LIKE 'boxTemperatureC%'; -UPDATE `sensors` SET `sensor_oid` = REPLACE(`sensor_oid`, 'NMS-IF-MIB::temperature', '.1.3.6.1.4.1.11606.10.9.63.1.7.1.44') WHERE `sensor_oid` LIKE 'NMS-IF-MIB::temperature%'; -UPDATE `sensors` SET `sensor_oid` = REPLACE(`sensor_oid`, 'systemTemperature', '.1.3.6.1.4.1.17163.1.1.2.9') WHERE `sensor_oid` LIKE 'systemTemperature%'; -UPDATE `sensors` SET `sensor_oid` = REPLACE(`sensor_oid`, 'rbSysTemperature', '.1.3.6.1.4.1.31926.1.2') WHERE `sensor_oid` LIKE 'rbSysTemperature%'; diff --git a/sql-schema/144.sql b/sql-schema/144.sql deleted file mode 100644 index 55fc155577..0000000000 --- a/sql-schema/144.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `ports_vlans` ADD `untagged` TINYINT NOT NULL DEFAULT '0' AFTER `cost`; diff --git a/sql-schema/145.sql b/sql-schema/145.sql deleted file mode 100644 index 7291b699b0..0000000000 --- a/sql-schema/145.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `alert_rules` ADD `query` TEXT NOT NULL AFTER `name`; diff --git a/sql-schema/146.sql b/sql-schema/146.sql deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sql-schema/147.sql b/sql-schema/147.sql deleted file mode 100644 index c4a0e35979..0000000000 --- a/sql-schema/147.sql +++ /dev/null @@ -1,2 +0,0 @@ -INSERT INTO config (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_group_order`,`config_sub_group`,`config_sub_group_order`,`config_hidden`,`config_disabled`) VALUES ('alert.transports.osticket.url','','','osTicket API URL','alerting',0, 'transports', 0, '0', '0'); -INSERT INTO config (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_group_order`,`config_sub_group`,`config_sub_group_order`,`config_hidden`,`config_disabled`) VALUES ('alert.transports.osticket.token','','','osTicket API Token','alerting',0, 'transports', 0, '0', '0'); diff --git a/sql-schema/148.sql b/sql-schema/148.sql deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sql-schema/149.sql b/sql-schema/149.sql deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sql-schema/150.sql b/sql-schema/150.sql deleted file mode 100644 index b594d5e80f..0000000000 --- a/sql-schema/150.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `services` MODIFY `service_ds` varchar(400) NOT NULL COMMENT 'Data Sources available for this service'; diff --git a/sql-schema/151.sql b/sql-schema/151.sql deleted file mode 100644 index 1729326a50..0000000000 --- a/sql-schema/151.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO config (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_group_order`,`config_sub_group`,`config_sub_group_order`,`config_hidden`,`config_disabled`) VALUES ('alert.transports.msteams.url','','','Microsoft Teams Webhook URL','alerting',0, 'transports', 0, '0', '0'); diff --git a/sql-schema/152.sql b/sql-schema/152.sql deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sql-schema/153.sql b/sql-schema/153.sql deleted file mode 100644 index bdf6980277..0000000000 --- a/sql-schema/153.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO `config` (`config_name`, `config_value`, `config_default`, `config_descr`, `config_group`, `config_group_order`, `config_sub_group`, `config_sub_group_order`, `config_hidden`, `config_disabled`) VALUES ('email_auto_tls','true','true','Enable / disable Auto TLS support','alerting',0,'general',0,'0','0'); diff --git a/sql-schema/154.sql b/sql-schema/154.sql deleted file mode 100644 index 7667cf3e81..0000000000 --- a/sql-schema/154.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `devices` CHANGE `ip` `ip` VARBINARY(16) NULL DEFAULT NULL; -ALTER TABLE `alert_log` CHANGE `details` `details` LONGBLOB NULL DEFAULT NULL; diff --git a/sql-schema/155.sql b/sql-schema/155.sql deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sql-schema/156.sql b/sql-schema/156.sql deleted file mode 100644 index b0dfeb4858..0000000000 --- a/sql-schema/156.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `component_prefs` CHANGE `value` `value` text NOT NULL COMMENT 'Value for the Component'; diff --git a/sql-schema/157.sql b/sql-schema/157.sql deleted file mode 100644 index 03e4afcb73..0000000000 --- a/sql-schema/157.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `alert_schedule` CHANGE `start` `start` DATETIME NOT NULL DEFAULT '1970-01-02 00:00:01', CHANGE `end` `end` DATETIME NOT NULL DEFAULT '1970-01-02 00:00:01'; -ALTER TABLE alert_schedule ADD COLUMN `recurring` tinyint (1) UNSIGNED NOT NULL DEFAULT 0 AFTER `schedule_id`, ADD COLUMN `start_recurring_dt` DATE NOT NULL DEFAULT '1970-01-01 00:00:01' AFTER `end`, ADD COLUMN `end_recurring_dt` DATE DEFAULT NULL AFTER `start_recurring_dt`, ADD COLUMN `start_recurring_hr` TIME NOT NULL DEFAULT '00:00:00' AFTER `end_recurring_dt`, ADD COLUMN `end_recurring_hr` TIME NOT NULL DEFAULT '00:00:00' AFTER `start_recurring_hr`, ADD COLUMN `recurring_day` VARCHAR(15) AFTER `end_recurring_hr`; diff --git a/sql-schema/158.sql b/sql-schema/158.sql deleted file mode 100644 index 6cbd278762..0000000000 --- a/sql-schema/158.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO config (`config_name`, `config_value`, `config_default`, `config_descr`, `config_group`, `config_group_order`, `config_sub_group`, `config_sub_group_order`, `config_hidden`, `config_disabled`) VALUES ('alert.transports.ciscospark.token','','','Cisco Spark API Token','alerting',0, 'transports', 0, '0', '0'), ('alert.transports.ciscospark.roomid','','','Cisco Spark RoomID','alerting',0, 'transports', 0, '0', '0'); diff --git a/sql-schema/159.sql b/sql-schema/159.sql deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sql-schema/160.sql b/sql-schema/160.sql deleted file mode 100644 index 73724574da..0000000000 --- a/sql-schema/160.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `devices` CHANGE `cryptoalgo` `cryptoalgo` ENUM('AES','DES','') NULL DEFAULT NULL; diff --git a/sql-schema/161.sql b/sql-schema/161.sql deleted file mode 100644 index 2e5fb51c0b..0000000000 --- a/sql-schema/161.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `ports` CHANGE COLUMN `ifName` `ifName` VARCHAR(255) DEFAULT NULL; \ No newline at end of file diff --git a/sql-schema/162.sql b/sql-schema/162.sql deleted file mode 100644 index f5e85cba3f..0000000000 --- a/sql-schema/162.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `ports` CHANGE `ifLastChange` `ifLastChange` BIGINT UNSIGNED NOT NULL DEFAULT '0'; diff --git a/sql-schema/163.sql b/sql-schema/163.sql deleted file mode 100644 index d8ab632a0b..0000000000 --- a/sql-schema/163.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `eventlog` CHANGE `datetime` `datetime` DATETIME NOT NULL DEFAULT '1970-01-02 00:00:01'; -ALTER TABLE `eventlog` ADD COLUMN `severity` INT(1) NULL DEFAULT 2 AFTER `reference`; diff --git a/sql-schema/164.sql b/sql-schema/164.sql deleted file mode 100644 index dae8e7bfce..0000000000 --- a/sql-schema/164.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `eventlog` CHANGE `datetime` `datetime` DATETIME NOT NULL DEFAULT '1970-01-02 00:00:01'; diff --git a/sql-schema/165.sql b/sql-schema/165.sql deleted file mode 100644 index 229c092fdb..0000000000 --- a/sql-schema/165.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `component_statuslog` ADD `message` TEXT NULL DEFAULT NULL AFTER `status`; diff --git a/sql-schema/166.sql b/sql-schema/166.sql deleted file mode 100644 index 97df71f53a..0000000000 --- a/sql-schema/166.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('webui.graph_type','png','png','Set the default graph type','webui',0,'graph',0,'0','0'); \ No newline at end of file diff --git a/sql-schema/167.sql b/sql-schema/167.sql deleted file mode 100644 index 11fd9a63e4..0000000000 --- a/sql-schema/167.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('rrd.step','300','300','Change the rrd step value (default 300)','external',0,'rrdtool',0,'0','0'), ('rrd.heartbeat','600','600','Change the rrd heartbeat value (default 600)','external',0,'rrdtool',0,'0','0'); diff --git a/sql-schema/168.sql b/sql-schema/168.sql deleted file mode 100644 index ea58e2e3b4..0000000000 --- a/sql-schema/168.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('alert.transports.smseagle.url','','','SMSEagle API URL','alerting',0,'transports',0,'0','0'),('alert.transports.smseagle.user','','','SMSEagle User','alerting',0,'transports',0,'0','0'),('alert.transports.smseagle.token','','','SMSEagle Token','alerting',0,'transports',0,'0','0'); diff --git a/sql-schema/169.sql b/sql-schema/169.sql deleted file mode 100644 index 7f0a815c18..0000000000 --- a/sql-schema/169.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `users` ADD `created_at` TIMESTAMP NOT NULL DEFAULT '1970-01-02 00:00:01' AFTER `dashboard`; -ALTER TABLE `users` ADD `updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `created_at`; -ALTER TABLE `users` ADD `remeber_token` VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL AFTER `updated_at`; diff --git a/sql-schema/170.sql b/sql-schema/170.sql deleted file mode 100644 index 6a6a7ce04d..0000000000 --- a/sql-schema/170.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `users` CHANGE `remeber_token` `remember_token` VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; diff --git a/sql-schema/171.sql b/sql-schema/171.sql deleted file mode 100644 index 9a71aff72f..0000000000 --- a/sql-schema/171.sql +++ /dev/null @@ -1,159 +0,0 @@ -ALTER TABLE `access_points` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `alert_map` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `alert_rules` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `alert_schedule` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `alert_schedule_items` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `alert_templates` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `alert_template_map` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `api_tokens` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `applications` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `bgpPeers` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `bgpPeers_cbgp` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `bills` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `bill_perms` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `bill_ports` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `bill_port_counters` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `callback` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `ciscoASA` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `config` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `customers` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `dashboards` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `dbSchema` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `devices_attribs` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `devices_perms` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `device_group_device` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `device_groups` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `device_mibs` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `device_oids` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `entPhysical` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `entPhysical_state` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `juniAtmVp` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `links` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `loadbalancer_rservers` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `loadbalancer_vservers` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `locations` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `mac_accounting` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `mibdefs` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `munin_plugins` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `munin_plugins_ds` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `netscaler_vservers` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `notifications` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `notifications_attribs` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `packages` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `plugins` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `poller_groups` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `pollers` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `port_association_mode` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `ports` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `ports_adsl` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `ports_perms` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `ports_statistics` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `ports_stp` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `ports_vlans` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `processes` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `proxmox` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `proxmox_ports` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `pseudowires` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `route` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `services` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `session` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `slas` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `storage` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `stp` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `alerts` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `toner` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `users` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `users_prefs` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `users_widgets` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `vlans` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `vminfo` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `vrf_lite_cisco` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `vrfs` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `widgets` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `alert_log` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `authlog` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `bill_data` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `bill_history` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `device_perf` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `syslog` DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `access_points` CHANGE `name` `name` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `type` `type` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `mac_addr` `mac_addr` VARCHAR(24) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `alert_map` CHANGE `target` `target` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT ''; -ALTER TABLE `alert_schedule` CHANGE `recurring_day` `recurring_day` VARCHAR(15) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `title` `title` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `notes` `notes` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `alert_schedule_items` CHANGE `target` `target` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `alert_templates` CHANGE `rule_id` `rule_id` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT ',', CHANGE `name` `name` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `template` `template` LONGTEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `title` `title` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `title_rec` `title_rec` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL; -ALTER TABLE `api_tokens` CHANGE `token_hash` `token_hash` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `description` `description` VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `applications` CHANGE `app_status` `app_status` VARCHAR(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `app_instance` `app_instance` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `bgpPeers` CHANGE `astext` `astext` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `bgpPeerIdentifier` `bgpPeerIdentifier` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `bgpPeerState` `bgpPeerState` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `bgpPeerAdminStatus` `bgpPeerAdminStatus` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `bgpLocalAddr` `bgpLocalAddr` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `bgpPeerRemoteAddr` `bgpPeerRemoteAddr` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `context_name` `context_name` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL; -ALTER TABLE `alert_rules` CHANGE `device_id` `device_id` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '', CHANGE `rule` `rule` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `severity` `severity` ENUM('ok','warning','critical') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `extra` `extra` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `name` `name` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `query` `query` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `proc` `proc` VARCHAR(80) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL; -ALTER TABLE `bgpPeers_cbgp` CHANGE `bgpPeerIdentifier` `bgpPeerIdentifier` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `afi` `afi` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `safi` `safi` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `context_name` `context_name` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL; -ALTER TABLE `bill_history` CHANGE `bill_type` `bill_type` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `dir_95th` `dir_95th` VARCHAR(3) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `bills` CHANGE `bill_name` `bill_name` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `bill_type` `bill_type` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `dir_95th` `dir_95th` VARCHAR(3) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `bill_custid` `bill_custid` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `bill_ref` `bill_ref` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `bill_notes` `bill_notes` VARCHAR(256) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `callback` CHANGE `name` `name` CHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `value` `value` CHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `ciscoASA` CHANGE `oid` `oid` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `config` CHANGE `config_name` `config_name` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `config_value` `config_value` VARCHAR(512) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `config_default` `config_default` VARCHAR(512) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `config_descr` `config_descr` VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `config_group` `config_group` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `config_sub_group` `config_sub_group` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `config_hidden` `config_hidden` ENUM('0','1') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '0', CHANGE `config_disabled` `config_disabled` ENUM('0','1') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '0'; -ALTER TABLE `customers` CHANGE `username` `username` CHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `password` `password` CHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `string` `string` CHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `dashboards` CHANGE `dashboard_name` `dashboard_name` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `device_groups` CHANGE `name` `name` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '', CHANGE `desc` `desc` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '', CHANGE `pattern` `pattern` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci, CHANGE `params` `params` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `device_mibs` CHANGE `module` `module` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `mib` `mib` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `included_by` `included_by` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `device_oids` CHANGE `oid` `oid` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `module` `module` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `mib` `mib` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `object_type` `object_type` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `value` `value` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL; -ALTER TABLE `devices` CHANGE `hostname` `hostname` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `sysName` `sysName` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `snmpver` `snmpver` VARCHAR(4) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'v2c', CHANGE `bgpLocalAs` `bgpLocalAs` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `sysDescr` `sysDescr` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci, CHANGE `sysContact` `sysContact` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci, CHANGE `version` `version` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci, CHANGE `hardware` `hardware` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci, CHANGE `features` `features` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci; -ALTER TABLE `devices_attribs` CHANGE `attrib_type` `attrib_type` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `attrib_value` `attrib_value` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `entPhysical` CHANGE `entPhysicalDescr` `entPhysicalDescr` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `entPhysicalClass` `entPhysicalClass` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `entPhysicalName` `entPhysicalName` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `entPhysicalHardwareRev` `entPhysicalHardwareRev` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `entPhysicalFirmwareRev` `entPhysicalFirmwareRev` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `entPhysicalSoftwareRev` `entPhysicalSoftwareRev` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `entPhysicalAlias` `entPhysicalAlias` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `entPhysicalAssetID` `entPhysicalAssetID` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `entPhysicalIsFRU` `entPhysicalIsFRU` VARCHAR(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `entPhysicalModelName` `entPhysicalModelName` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `entPhysicalVendorType` `entPhysicalVendorType` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci, CHANGE `entPhysicalSerialNum` `entPhysicalSerialNum` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `entPhysicalMfgName` `entPhysicalMfgName` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `entPhysical_state` CHANGE `entPhysicalIndex` `entPhysicalIndex` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `subindex` `subindex` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `group` `group` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `key` `key` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `value` `value` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `hrDevice` CHANGE `hrDeviceDescr` `hrDeviceDescr` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `hrDeviceType` `hrDeviceType` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `hrDeviceStatus` `hrDeviceStatus` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `ipv4_addresses` CHANGE `ipv4_address` `ipv4_address` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ipv4_network_id` `ipv4_network_id` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `context_name` `context_name` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL; -ALTER TABLE `ipv4_mac` CHANGE `mac_address` `mac_address` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ipv4_address` `ipv4_address` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `context_name` `context_name` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL; -ALTER TABLE `ipv4_networks` CHANGE `ipv4_network` `ipv4_network` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `context_name` `context_name` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL; -ALTER TABLE `ipv6_addresses` CHANGE `ipv6_address` `ipv6_address` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ipv6_compressed` `ipv6_compressed` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ipv6_origin` `ipv6_origin` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ipv6_network_id` `ipv6_network_id` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `context_name` `context_name` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL; -ALTER TABLE `ipv6_networks` CHANGE `ipv6_network` `ipv6_network` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `context_name` `context_name` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL; -ALTER TABLE `juniAtmVp` CHANGE `vp_descr` `vp_descr` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `links` CHANGE `protocol` `protocol` VARCHAR(11) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `remote_hostname` `remote_hostname` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `remote_port` `remote_port` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `remote_platform` `remote_platform` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `remote_version` `remote_version` VARCHAR(256) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `loadbalancer_rservers` CHANGE `farm_id` `farm_id` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `StateDescr` `StateDescr` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `loadbalancer_vservers` CHANGE `classmap` `classmap` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `serverstate` `serverstate` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `locations` CHANGE `location` `location` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `mac_accounting` CHANGE `mac` `mac` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `in_oid` `in_oid` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `out_oid` `out_oid` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `mibdefs` CHANGE `module` `module` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `mib` `mib` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `object_type` `object_type` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `oid` `oid` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `syntax` `syntax` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `description` `description` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `max_access` `max_access` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `status` `status` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `included_by` `included_by` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `mempools` CHANGE `mempool_index` `mempool_index` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `mempool_type` `mempool_type` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `mempool_descr` `mempool_descr` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `munin_plugins` CHANGE `mplug_type` `mplug_type` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `mplug_instance` `mplug_instance` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `mplug_category` `mplug_category` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `mplug_title` `mplug_title` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `mplug_info` `mplug_info` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci, CHANGE `mplug_vlabel` `mplug_vlabel` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `mplug_args` `mplug_args` VARCHAR(512) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL; -ALTER TABLE `munin_plugins_ds` CHANGE `ds_name` `ds_name` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ds_type` `ds_type` ENUM('COUNTER','ABSOLUTE','DERIVE','GAUGE') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'GAUGE', CHANGE `ds_label` `ds_label` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ds_cdef` `ds_cdef` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ds_draw` `ds_draw` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ds_graph` `ds_graph` ENUM('no','yes') CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'yes', CHANGE `ds_info` `ds_info` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ds_extinfo` `ds_extinfo` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ds_max` `ds_max` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ds_min` `ds_min` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ds_negative` `ds_negative` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ds_warning` `ds_warning` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ds_critical` `ds_critical` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ds_colour` `ds_colour` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ds_sum` `ds_sum` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ds_stack` `ds_stack` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ds_line` `ds_line` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `notifications` CHANGE `title` `title` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '', CHANGE `body` `body` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `source` `source` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '', CHANGE `checksum` `checksum` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `notifications_attribs` CHANGE `key` `key` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '', CHANGE `value` `value` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT ''; -ALTER TABLE `ospf_areas` CHANGE `context_name` `context_name` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL; -ALTER TABLE `ospf_instances` CHANGE `context_name` `context_name` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL; -ALTER TABLE `ospf_nbrs` CHANGE `context_name` `context_name` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL; -ALTER TABLE `ospf_ports` CHANGE `context_name` `context_name` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL; -ALTER TABLE `packages` CHANGE `name` `name` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `manager` `manager` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '1', CHANGE `version` `version` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `build` `build` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `arch` `arch` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `plugins` CHANGE `plugin_name` `plugin_name`VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `poller_groups` CHANGE `group_name` `group_name` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `descr` `descr` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `pollers` CHANGE `poller_name` `poller_name` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `port_association_mode` CHANGE `name` `name` VARCHAR(12) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `ports` CHANGE `port_descr_type` `port_descr_type` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `port_descr_descr` `port_descr_descr` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `port_descr_circuit` `port_descr_circuit` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `port_descr_speed` `port_descr_speed` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `port_descr_notes` `port_descr_notes` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `ifDescr` `ifDescr` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `ifName` `ifName` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `portName` `portName` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `ifConnectorPresent` `ifConnectorPresent` VARCHAR(12) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `ifPromiscuousMode` `ifPromiscuousMode` VARCHAR(12) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `ifOperStatus` `ifOperStatus` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `ifOperStatus_prev` `ifOperStatus_prev` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `ifAdminStatus` `ifAdminStatus` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `ifAdminStatus_prev` `ifAdminStatus_prev` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `ifDuplex` `ifDuplex` VARCHAR(12) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `ifType` `ifType` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci, CHANGE `ifAlias` `ifAlias` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci, CHANGE `ifPhysAddress` `ifPhysAddress` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci, CHANGE `ifHardType` `ifHardType` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `ifVlan` `ifVlan` VARCHAR(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '', CHANGE `ifTrunk` `ifTrunk` VARCHAR(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT '', CHANGE `pagpOperationMode` `pagpOperationMode` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `pagpPortState` `pagpPortState` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `pagpPartnerDeviceId` `pagpPartnerDeviceId` VARCHAR(48) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `pagpPartnerLearnMethod` `pagpPartnerLearnMethod` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `pagpPartnerDeviceName` `pagpPartnerDeviceName` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `pagpEthcOperationMode` `pagpEthcOperationMode` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `pagpDeviceId` `pagpDeviceId` VARCHAR(48) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL; -ALTER TABLE `ports_adsl` CHANGE `adslLineCoding` `adslLineCoding` VARCHAR(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `adslLineType` `adslLineType` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `adslAtucInvVendorID` `adslAtucInvVendorID` VARCHAR(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `adslAtucInvVersionNumber` `adslAtucInvVersionNumber` VARCHAR(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `adslAturInvSerialNumber` `adslAturInvSerialNumber` VARCHAR(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `adslAturInvVendorID` `adslAturInvVendorID` VARCHAR(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `adslAturInvVersionNumber` `adslAturInvVersionNumber` VARCHAR(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `ports_stp` CHANGE `state` `state` VARCHAR(11) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `enable` `enable` VARCHAR(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `designatedRoot` `designatedRoot` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `designatedBridge` `designatedBridge` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `ports_vlans` CHANGE `state` `state` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `processes` CHANGE `cputime` `cputime` VARCHAR(12) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `user` `user` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `command` `command` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `processors` CHANGE `processor_index` `processor_index` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `processor_descr` `processor_descr` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `proxmox` CHANGE `cluster` `cluster` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `description` `description` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL; -ALTER TABLE `proxmox_ports` CHANGE `port` `port` VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `pseudowires` CHANGE `pw_type` `pw_type` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `pw_psntype` `pw_psntype` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `pw_descr` `pw_descr` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `route` CHANGE `context_name` `context_name` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ipRouteDest` `ipRouteDest` VARCHAR(256) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ipRouteIfIndex` `ipRouteIfIndex` VARCHAR(256) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `ipRouteMetric` `ipRouteMetric` VARCHAR(256) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ipRouteNextHop` `ipRouteNextHop` VARCHAR(256) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ipRouteType` `ipRouteType` VARCHAR(256) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ipRouteProto` `ipRouteProto` VARCHAR(256) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `ipRouteMask` `ipRouteMask` VARCHAR(256) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `sensors` CHANGE `sensor_oid` `sensor_oid` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `sensor_type` `sensor_type` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `entPhysicalIndex` `entPhysicalIndex` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `entPhysicalIndex_measured` `entPhysicalIndex_measured` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `sensor_class` `sensor_class` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `services` CHANGE `service_ip` `service_ip` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `service_type` `service_type` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `service_desc` `service_desc` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `service_param` `service_param` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `service_message` `service_message` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `service_ds` `service_ds` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT 'Data Sources available for this service'; -ALTER TABLE `session` CHANGE `session_username` `session_username` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `session_value` `session_value` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `session_token` `session_token` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `session_auth` `session_auth` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `slas` CHANGE `owner` `owner` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `tag` `tag` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `rtt_type` `rtt_type` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `storage` CHANGE `storage_mib` `storage_mib` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `storage_type` `storage_type` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `storage_descr` `storage_descr` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `stp` CHANGE `bridgeAddress` `bridgeAddress` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `protocolSpecification` `protocolSpecification` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `timeSinceTopologyChange` `timeSinceTopologyChange` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `designatedRoot` `designatedRoot` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `toner` CHANGE `toner_type` `toner_type` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `toner_oid` `toner_oid` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `toner_descr` `toner_descr` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '', CHANGE `toner_capacity_oid` `toner_capacity_oid` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL; -ALTER TABLE `ucd_diskio` CHANGE `diskio_descr` `diskio_descr` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `users` CHANGE `username` `username` CHAR(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `password` `password` VARCHAR(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `realname` `realname` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `email` `email` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `descr` `descr` CHAR(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `twofactor` `twofactor` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `users_prefs` CHANGE `pref` `pref` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `value` `value` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `users_widgets` CHANGE `title` `title` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `settings` `settings` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `vlans` CHANGE `vlan_vlan` `vlan_vlan` INT(11) COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `vlan_type` `vlan_type` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `vlan_name` `vlan_name` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL; -ALTER TABLE `vminfo` CHANGE `vm_type` `vm_type` VARCHAR(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'vmware', CHANGE `vmwVmDisplayName` `vmwVmDisplayName` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `vmwVmGuestOS` `vmwVmGuestOS` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `vmwVmState` `vmwVmState` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `vrf_lite_cisco` CHANGE `context_name` `context_name` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `intance_name` `intance_name` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT '', CHANGE `vrf_name` `vrf_name` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT 'Default'; -ALTER TABLE `vrfs` CHANGE `vrf_oid` `vrf_oid` VARCHAR(256) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `vrf_name` `vrf_name` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `mplsVpnVrfRouteDistinguisher` `mplsVpnVrfRouteDistinguisher` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `mplsVpnVrfDescription` `mplsVpnVrfDescription` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `widgets` CHANGE `widget_title` `widget_title` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `widget` `widget` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `base_dimensions` `base_dimensions` VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `authlog` CHANGE `user` `user` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `address` `address` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `result` `result` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `eventlog` CHANGE `message` `message` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci, CHANGE `type` `type` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `reference` `reference` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `perf_times` CHANGE `type` `type` VARCHAR(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, CHANGE `doing` `doing` VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `syslog` CHANGE `facility` `facility` VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `priority` `priority` VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `level` `level` VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `tag` `tag` VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `program` `program` VARCHAR(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL, CHANGE `msg` `msg` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci; diff --git a/sql-schema/172.sql b/sql-schema/172.sql deleted file mode 100644 index d2339c9471..0000000000 --- a/sql-schema/172.sql +++ /dev/null @@ -1,5 +0,0 @@ -DROP TABLE IF EXISTS `cmpMemPool`; -DROP TABLE IF EXISTS `current`; -DROP TABLE IF EXISTS `fanspeed`; -DROP TABLE IF EXISTS `frequency`; -DROP TABLE IF EXISTS `voltage`; diff --git a/sql-schema/173.sql b/sql-schema/173.sql deleted file mode 100644 index 3e70185f8d..0000000000 --- a/sql-schema/173.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `processors` ADD `processor_perc_warn` int(11) DEFAULT '75'; -ALTER TABLE `mempools` ADD `mempool_perc_warn` int(11) DEFAULT '75'; diff --git a/sql-schema/174.sql b/sql-schema/174.sql deleted file mode 100644 index aabab6591f..0000000000 --- a/sql-schema/174.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `eventlog` ADD `username` VARCHAR(128) NULL DEFAULT NULL AFTER `reference`; diff --git a/sql-schema/175.sql b/sql-schema/175.sql deleted file mode 100644 index 09e8f49462..0000000000 --- a/sql-schema/175.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE IF NOT EXISTS `mefinfo` ( `id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `mefID` int(32) NOT NULL, `mefType` varchar(128) NOT NULL, `mefIdent` varchar(128) NOT NULL, `mefMTU` int(16) NOT NULL DEFAULT '1500', `mefAdmState` varchar(128) NOT NULL, `mefRowState` varchar(128) NOT NULL, PRIMARY KEY (`id`), KEY `device_id` (`device_id`), KEY `mefID` (`mefID`)) DEFAULT CHARSET=utf8 COLLATE utf8_unicode_ci; diff --git a/sql-schema/176.sql b/sql-schema/176.sql deleted file mode 100644 index d687ecfcbd..0000000000 --- a/sql-schema/176.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `applications` ADD `timestamp` TIMESTAMP NOT NULL AFTER `app_status`; -ALTER TABLE `applications` ADD `app_state_prev` VARCHAR(32) NOT NULL AFTER `app_state`; diff --git a/sql-schema/177.sql b/sql-schema/177.sql deleted file mode 100644 index 3cdf36d49f..0000000000 --- a/sql-schema/177.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('alert.default_if_none','false','false','Send mail to default contact if no other contacts are found','alerting',0,'general',0,'0','0'); diff --git a/sql-schema/178.sql b/sql-schema/178.sql deleted file mode 100644 index 7c491c4628..0000000000 --- a/sql-schema/178.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `users` MODIFY `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP; diff --git a/sql-schema/179.sql b/sql-schema/179.sql deleted file mode 100644 index 08e7ee84dc..0000000000 --- a/sql-schema/179.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `users` CHANGE `remember_token` `remember_token` VARCHAR(100) NULL; diff --git a/sql-schema/180.sql b/sql-schema/180.sql deleted file mode 100644 index 033c612a01..0000000000 --- a/sql-schema/180.sql +++ /dev/null @@ -1,3 +0,0 @@ -INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('peeringdb.enabled','false','false','Enable PeeringDB lookup (data is downloaded with daily.sh)','external',0,'peeringdb',0,'0','0'); -CREATE TABLE `pdb_ix` ( `pdb_ix_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `ix_id` int(10) unsigned NOT NULL, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `asn` int(10) unsigned NOT NULL, `timestamp` int(10) unsigned NOT NULL, PRIMARY KEY (`pdb_ix_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -CREATE TABLE `pdb_ix_peers` ( `pdb_ix_peers_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `ix_id` int(10) unsigned NOT NULL, `peer_id` int(10) unsigned NOT NULL, `remote_asn` varchar(16) COLLATE utf8_unicode_ci NOT NULL, `remote_ipaddr4` VARCHAR(15) COLLATE utf8_unicode_ci NULL, `remote_ipaddr6` VARCHAR(128) COLLATE utf8_unicode_ci NULL, `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `timestamp` int(10) unsigned DEFAULT NULL, PRIMARY KEY (`pdb_ix_peers_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; diff --git a/sql-schema/181.sql b/sql-schema/181.sql deleted file mode 100644 index 766b2a66b5..0000000000 --- a/sql-schema/181.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `applications` CHANGE `app_state_prev` `app_state_prev` VARCHAR(32) NULL; -ALTER TABLE `applications` ADD `discovered` TINYINT NOT NULL DEFAULT '0' AFTER `app_state`; -ALTER IGNORE TABLE `applications` ADD UNIQUE `unique_index`(`device_id`, `app_type`); diff --git a/sql-schema/182.sql b/sql-schema/182.sql deleted file mode 100644 index 9316b77de3..0000000000 --- a/sql-schema/182.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('alert.transports.syslog.syslog_host','','','Syslog Host','alerting',0,'transports',0,'0','0'),('alert.transports.syslog.syslog_port','','','Syslog Port','alerting',0,'transports',0,'0','0'),('alert.transports.syslog.syslog_facility','','','Syslog Facility','alerting',0,'transports',0,'0','0'); diff --git a/sql-schema/183.sql b/sql-schema/183.sql deleted file mode 100644 index 962786b875..0000000000 --- a/sql-schema/183.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `users` CHANGE `created_at` `created_at` TIMESTAMP NOT NULL DEFAULT '1970-01-02 00:00:01'; -ALTER TABLE `eventlog` CHANGE `datetime` `datetime` DATETIME NOT NULL DEFAULT '1970-01-02 00:00:01'; -ALTER TABLE `alert_schedule` CHANGE `start` `start` DATETIME NOT NULL DEFAULT '1970-01-02 00:00:01', CHANGE `end` `end` DATETIME NOT NULL DEFAULT '1970-01-02 00:00:01'; diff --git a/sql-schema/184.sql b/sql-schema/184.sql deleted file mode 100644 index f3ef3bb8a6..0000000000 --- a/sql-schema/184.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE users_prefs DROP PRIMARY KEY; -ALTER TABLE users_prefs DROP INDEX pref; -INSERT INTO `users_prefs` (`user_id`, `pref`, `value`) SELECT `user_id`, 'dashboard', `dashboard` FROM `users` WHERE `dashboard` != '0'; -INSERT INTO `users_prefs` (`user_id`, `pref`, `value`) SELECT `user_id`, 'twofactor', `twofactor` FROM `users` WHERE `twofactor` != '0'; -ALTER TABLE `users` DROP `twofactor`, DROP `dashboard`; diff --git a/sql-schema/185.sql b/sql-schema/185.sql deleted file mode 100644 index 2ef42e06d3..0000000000 --- a/sql-schema/185.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE IF NOT EXISTS `tnmsneinfo` ( `id` int(11) NOT NULL AUTO_INCREMENT, `device_id` int(11) NOT NULL, `neID` int(32) NOT NULL, `neType` varchar(128) NOT NULL, `neName` varchar(128) NOT NULL, `neLocation` varchar(128) NOT NULL, `neAlarm` varchar(128) NOT NULL, `neOpMode` varchar(128) NOT NULL, `neOpState` varchar(128) NOT NULL, PRIMARY KEY (`id`), KEY `device_id` (`device_id`), KEY `neID` (`neID`)) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; diff --git a/sql-schema/186.sql b/sql-schema/186.sql deleted file mode 100644 index 317ce7ce3e..0000000000 --- a/sql-schema/186.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `services` MODIFY `service_type` varchar(255) NOT NULL; diff --git a/sql-schema/187.sql b/sql-schema/187.sql deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sql-schema/188.sql b/sql-schema/188.sql deleted file mode 100644 index c828dc533b..0000000000 --- a/sql-schema/188.sql +++ /dev/null @@ -1,4 +0,0 @@ -CREATE TABLE `wireless_sensors` (sensor_id INT(11) PRIMARY KEY NOT NULL AUTO_INCREMENT, sensor_deleted TINYINT(1) DEFAULT '0' NOT NULL, sensor_class VARCHAR(64) NOT NULL, device_id INT(11) unsigned DEFAULT '0' NOT NULL, sensor_index VARCHAR(64), sensor_type VARCHAR(255) NOT NULL, sensor_descr VARCHAR(255), sensor_divisor INT(11) DEFAULT '1' NOT NULL, sensor_multiplier INT(11) DEFAULT '1' NOT NULL, sensor_aggregator VARCHAR(16) DEFAULT 'sum' NOT NULL, sensor_current FLOAT, sensor_prev FLOAT, sensor_limit FLOAT, sensor_limit_warn FLOAT, sensor_limit_low FLOAT, sensor_limit_low_warn FLOAT, sensor_alert TINYINT(1) DEFAULT '1' NOT NULL, sensor_custom ENUM('No', 'Yes') DEFAULT 'No' NOT NULL, entPhysicalIndex VARCHAR(16), entPhysicalIndex_measured VARCHAR(16), lastupdate TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL, sensor_oids VARCHAR(255) NOT NULL, access_point_id INT(11), CONSTRAINT wireless_sensors_device_id_foreign FOREIGN KEY (device_id) REFERENCES `devices` (device_id) ON DELETE CASCADE); -CREATE INDEX sensor_class ON `wireless_sensors` (sensor_class); -CREATE INDEX sensor_host ON `wireless_sensors` (device_id); -CREATE INDEX sensor_type ON `wireless_sensors` (sensor_type); diff --git a/sql-schema/189.sql b/sql-schema/189.sql deleted file mode 100644 index 2d3ca605ce..0000000000 --- a/sql-schema/189.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE syslog ADD INDEX priority_level (priority, level); diff --git a/sql-schema/190.sql b/sql-schema/190.sql deleted file mode 100644 index 81485ab58d..0000000000 --- a/sql-schema/190.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `wireless_sensors` MODIFY `sensor_oids` TEXT NOT NULL; diff --git a/sql-schema/191.sql b/sql-schema/191.sql deleted file mode 100644 index 2874618e0f..0000000000 --- a/sql-schema/191.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('alert.users',false,false,'Issue alerts to normal users','alerting',0,'general',0 ,'0' ,'0'); diff --git a/sql-schema/192.sql b/sql-schema/192.sql deleted file mode 100644 index e67b317c9d..0000000000 --- a/sql-schema/192.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `sensors` ADD `user_func` VARCHAR(100) NULL; \ No newline at end of file diff --git a/sql-schema/193.sql b/sql-schema/193.sql deleted file mode 100644 index fb108aaccb..0000000000 --- a/sql-schema/193.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('alert.transports.elasticsearch.es_host','','127.0.0.1','Elasticsearch Host','alerting',0,'transports',0,'0','0'),('alert.transports.elasticsearch.es_port','','9200','Elasticsearch Port','alerting',0,'transports',0,'0','0'),('alert.transports.elasticsearch.es_index','','','Elasticsearch Index','alerting',0,'transports',0,'0','0'),('alert.transports.elasticsearch.es_proxy','','FALSE','Use Proxy?','alerting',0,'transports',0,'0','0'); diff --git a/sql-schema/194.sql b/sql-schema/194.sql deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sql-schema/195.sql b/sql-schema/195.sql deleted file mode 100644 index 2f59b0b27d..0000000000 --- a/sql-schema/195.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `devices` CHANGE `sysObjectID` `sysObjectID` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL; diff --git a/sql-schema/196.sql b/sql-schema/196.sql deleted file mode 100644 index c2626a36e9..0000000000 --- a/sql-schema/196.sql +++ /dev/null @@ -1,2 +0,0 @@ -CREATE TABLE `ports_fdb` ( `ports_fdb_id` BIGINT(20) PRIMARY KEY NOT NULL AUTO_INCREMENT, `port_id` INT(11) unsigned NOT NULL, `mac_address` VARCHAR(32) NOT NULL, `vlan_id` INT(11) unsigned NOT NULL, `device_id` INT(11) unsigned NOT NULL); -ALTER TABLE `ports_fdb` ADD INDEX ( `mac_address` ); diff --git a/sql-schema/197.sql b/sql-schema/197.sql deleted file mode 100644 index 6708fbd013..0000000000 --- a/sql-schema/197.sql +++ /dev/null @@ -1 +0,0 @@ -TRUNCATE TABLE `perf_times`; diff --git a/sql-schema/198.sql b/sql-schema/198.sql deleted file mode 100644 index d87f76b495..0000000000 --- a/sql-schema/198.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE `ports_fdb` DROP `ports_fdb_id`; -CREATE INDEX `ports_fdb_port_id_index` ON `ports_fdb` (`port_id`); -CREATE INDEX `ports_fdb_device_id_index` ON `ports_fdb` (`device_id`); -CREATE INDEX `ports_fdb_vlan_id_index` ON `ports_fdb` (`vlan_id`); diff --git a/sql-schema/199.sql b/sql-schema/199.sql deleted file mode 100644 index b11f3506c6..0000000000 --- a/sql-schema/199.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `ipv4_mac` ADD `device_id` INT NULL AFTER `port_id`; diff --git a/sql-schema/200.sql b/sql-schema/200.sql deleted file mode 100644 index fab4828729..0000000000 --- a/sql-schema/200.sql +++ /dev/null @@ -1,5 +0,0 @@ -INSERT INTO `config` (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values('alert.transports.jira.prjkey','','','Jira Project Key','alerting',0,'transports',0,default,default); -INSERT INTO `config` (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values('alert.transports.jira.url','','','Jira URL','alerting',0,'transports',0,default,default); -INSERT INTO `config` (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values('alert.transports.jira.username','','','Jira Username','alerting',0,'transports',0,default,default); -INSERT INTO `config` (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values('alert.transports.jira.password','','','Jira Password','alerting',0,'transports',0,default,default); -INSERT INTO `config` (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values('alert.transports.jira.issuetype','','','Jira Issue Type','alerting',0,'transports',0,default,default); diff --git a/sql-schema/201.sql b/sql-schema/201.sql deleted file mode 100644 index 677a90ee9b..0000000000 --- a/sql-schema/201.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `sensors` ADD `entity_link_type` VARCHAR(32) NULL, ADD `entity_link_index` INT(11) UNSIGNED NOT NULL DEFAULT 0; diff --git a/sql-schema/202.sql b/sql-schema/202.sql deleted file mode 100644 index d625d849ba..0000000000 --- a/sql-schema/202.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO `alert_templates` (name, template) values('Default Alert Template', '{{ $alert->title }}\nSeverity: {{ $alert->severity }}\n @if ($alert->state == 0) Time elapsed: {{ $alert->elapsed }}\n @endif Timestamp: {{ $alert->timestamp }}\nUnique-ID: {{ $alert->uid }}\nRule: @if ($alert->name) {{ $alert->name }} @else {{ $alert->rule }} @endif\n @if ($alert->faults) Faults:\n @foreach ($alert->faults as $key => $value) #{{ $key }}: {{ $value[\'string\'] }}\n @endforeach @endif Alert sent to: @foreach ($alert->contacts as $key => $value){{ $value }} <{{ $key }}> @endforeach'); diff --git a/sql-schema/203.sql b/sql-schema/203.sql deleted file mode 100644 index 9ff0ed10dd..0000000000 --- a/sql-schema/203.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE ports MODIFY ifTrunk VARCHAR(16); diff --git a/sql-schema/204.sql b/sql-schema/204.sql deleted file mode 100644 index e350dba8f7..0000000000 --- a/sql-schema/204.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `dbSchema` DROP PRIMARY KEY; -ALTER TABLE `dbSchema` ADD PRIMARY KEY (`version`); -ALTER TABLE `dbSchema` CHANGE `version` `version` int(11) NOT NULL DEFAULT '0'; diff --git a/sql-schema/205.sql b/sql-schema/205.sql deleted file mode 100644 index 4cb0432ca4..0000000000 --- a/sql-schema/205.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE `notifications` CHANGE `datetime` `datetime` timestamp NOT NULL DEFAULT '1970-01-02 00:00:00'; -ALTER TABLE `notifications` ADD `severity` INT DEFAULT 0 NULL COMMENT '0=ok,1=warning,2=critical' AFTER `body`; -CREATE INDEX `notifications_severity_index` ON `notifications` (`severity`); diff --git a/sql-schema/206.sql b/sql-schema/206.sql deleted file mode 100644 index a41c6052a1..0000000000 --- a/sql-schema/206.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `graph_types` CHANGE `graph_subtype` `graph_subtype` varchar(64) NOT NULL; diff --git a/sql-schema/207.sql b/sql-schema/207.sql deleted file mode 100644 index f1c5ed0ef2..0000000000 --- a/sql-schema/207.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `state_translations` CHANGE `state_value` `state_value` smallint(5) NOT NULL DEFAULT 0; diff --git a/sql-schema/208.sql b/sql-schema/208.sql deleted file mode 100644 index ffa9b7ad05..0000000000 --- a/sql-schema/208.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('alert.transports.opsgenie.url','','','OpsGenie Webhook URL','alerting',0,'transports',0,'0','0'); \ No newline at end of file diff --git a/sql-schema/209.sql b/sql-schema/209.sql deleted file mode 100644 index 6c36c3a96e..0000000000 --- a/sql-schema/209.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `users` CHANGE COLUMN `username` `username` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; -ALTER TABLE `session` CHANGE COLUMN `session_username` `session_username` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL; diff --git a/sql-schema/210.sql b/sql-schema/210.sql deleted file mode 100644 index ecddcba4e7..0000000000 --- a/sql-schema/210.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `links` MODIFY `remote_platform` VARCHAR(256); diff --git a/sql-schema/211.sql b/sql-schema/211.sql deleted file mode 100644 index 7b8320cfd9..0000000000 --- a/sql-schema/211.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `config` CHANGE `config_group_order` `config_group_order` INT(11) NOT NULL DEFAULT 0; -ALTER TABLE `config` CHANGE `config_sub_group_order` `config_sub_group_order` INT(11) NOT NULL DEFAULT 0; diff --git a/sql-schema/212.sql b/sql-schema/212.sql deleted file mode 100644 index 9ecfa17eb0..0000000000 --- a/sql-schema/212.sql +++ /dev/null @@ -1 +0,0 @@ -DELETE FROM `pollers` WHERE `poller_name` LIKE '%\n'; diff --git a/sql-schema/213.sql b/sql-schema/213.sql deleted file mode 100644 index 983fa40865..0000000000 --- a/sql-schema/213.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `devices` ADD `snmp_disable` TINYINT(1) NOT NULL DEFAULT 0 AFTER `retries`; diff --git a/sql-schema/214.sql b/sql-schema/214.sql deleted file mode 100644 index 9ecfa17eb0..0000000000 --- a/sql-schema/214.sql +++ /dev/null @@ -1 +0,0 @@ -DELETE FROM `pollers` WHERE `poller_name` LIKE '%\n'; diff --git a/sql-schema/215.sql b/sql-schema/215.sql deleted file mode 100644 index 4fb5badb94..0000000000 --- a/sql-schema/215.sql +++ /dev/null @@ -1,2 +0,0 @@ -TRUNCATE `perf_times`; -ALTER TABLE `perf_times` ADD COLUMN `id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST; diff --git a/sql-schema/216.sql b/sql-schema/216.sql deleted file mode 100644 index 7f323d2c05..0000000000 --- a/sql-schema/216.sql +++ /dev/null @@ -1,6 +0,0 @@ -UPDATE `sensors` SET `entPhysicalIndex_measured` = 'ports', `entPhysicalIndex` = entity_link_index WHERE entity_link_type='port'; -UPDATE `alert_rules` SET `query` = REPLACE(query, 'entity_link_type', 'entPhysicalIndex_measured'); -UPDATE `alert_rules` SET `query` = REPLACE(query, 'entity_link_index', 'entPhysicalIndex'); -UPDATE `alert_rules` SET `rule` = REPLACE(rule, 'entity_link_type', 'entPhysicalIndex_measured'); -UPDATE `alert_rules` SET `rule` = REPLACE(rule, 'entity_link_index', 'entPhysicalIndex'); -ALTER TABLE `sensors` DROP `entity_link_type` , DROP `entity_link_index`; diff --git a/sql-schema/217.sql b/sql-schema/217.sql deleted file mode 100644 index dd20ac497d..0000000000 --- a/sql-schema/217.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `storage` CHANGE `storage_index` `storage_index` VARCHAR(64) DEFAULT NULL; diff --git a/sql-schema/218.sql b/sql-schema/218.sql deleted file mode 100644 index 9aa7990c08..0000000000 --- a/sql-schema/218.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO `config` (`config_name`, `config_value`, `config_default`, `config_descr`, `config_group`, `config_group_order`, `config_sub_group`, `config_sub_group_order`, `config_hidden`, `config_disabled`) VALUES('webui.graph_stacked', 'false', 'false', 'Display stacked graphs instead of inverted graphs', 'webui', 0, 'graph', 0, '0', '0'); diff --git a/sql-schema/219.sql b/sql-schema/219.sql deleted file mode 100644 index 41559b915e..0000000000 --- a/sql-schema/219.sql +++ /dev/null @@ -1,2 +0,0 @@ -CREATE TABLE application_metrics (app_id INT(11) NOT NULL, metric VARCHAR(18) NOT NULL, value INT(11), value_prev INT(11)); -CREATE UNIQUE INDEX application_metrics_app_id_metric_uindex ON application_metrics (app_id, metric); diff --git a/sql-schema/220.sql b/sql-schema/220.sql deleted file mode 100644 index 3a0e506409..0000000000 --- a/sql-schema/220.sql +++ /dev/null @@ -1,2 +0,0 @@ -CREATE TABLE entityState (entity_state_id INT(11) PRIMARY KEY NOT NULL AUTO_INCREMENT, device_id INT(11), entPhysical_id INT(11), entStateLastChanged DATETIME, entStateAdmin INT(11), entStateOper INT(11), entStateUsage INT(11), entStateAlarm TEXT, entStateStandby INT(11)); -CREATE INDEX entityState_device_id_index ON entityState (device_id); diff --git a/sql-schema/221.sql b/sql-schema/221.sql deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sql-schema/222.sql b/sql-schema/222.sql deleted file mode 100644 index bdb2d4b0dd..0000000000 --- a/sql-schema/222.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `application_metrics` CHANGE `metric` `metric` varchar(32) NOT NULL; diff --git a/sql-schema/223.sql b/sql-schema/223.sql deleted file mode 100644 index 74e25151d8..0000000000 --- a/sql-schema/223.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `sensors` MODIFY `sensor_divisor` BIGINT(20) NOT NULL DEFAULT '1', CHANGE sensor_index sensor_index VARCHAR( 128 ); diff --git a/sql-schema/224.sql b/sql-schema/224.sql deleted file mode 100644 index bd0b354e21..0000000000 --- a/sql-schema/224.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE processes MODIFY command TEXT NOT NULL; diff --git a/sql-schema/225.sql b/sql-schema/225.sql deleted file mode 100644 index c70a21d4cc..0000000000 --- a/sql-schema/225.sql +++ /dev/null @@ -1 +0,0 @@ -CREATE TABLE device_relationships ( parent_device_id int(11) unsigned NOT NULL DEFAULT 0, child_device_id int(11) unsigned NOT NULL, PRIMARY KEY (parent_device_id, child_device_id), CONSTRAINT device_relationship_parent_device_id_fk FOREIGN KEY (parent_device_id) REFERENCES devices (device_id) ON DELETE CASCADE, CONSTRAINT device_relationship_child_device_id_fk FOREIGN KEY (child_device_id) REFERENCES devices (device_id) ON DELETE CASCADE )ENGINE=InnoDB; diff --git a/sql-schema/226.sql b/sql-schema/226.sql deleted file mode 100644 index ee7e65e769..0000000000 --- a/sql-schema/226.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO widgets VALUES(default, 'Server Stats', 'server-stats', '6,3'); diff --git a/sql-schema/227.sql b/sql-schema/227.sql deleted file mode 100644 index ffdfaa52ab..0000000000 --- a/sql-schema/227.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `bgpPeers` CHANGE `astext` `astext` varchar(255) NOT NULL; diff --git a/sql-schema/228.sql b/sql-schema/228.sql deleted file mode 100644 index 471671d629..0000000000 --- a/sql-schema/228.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `alert_rules` SET `rule` = REPLACE(rule, 'enterprises.', '.1.3.6.1.4.1.'); diff --git a/sql-schema/229.sql b/sql-schema/229.sql deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sql-schema/230.sql b/sql-schema/230.sql deleted file mode 100644 index be0f034d22..0000000000 --- a/sql-schema/230.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `devices_attribs` SET `attrib_type` = REPLACE(attrib_type, 'discover_cisco-vrf', 'discover_vrf'); diff --git a/sql-schema/231.sql b/sql-schema/231.sql deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sql-schema/232.sql b/sql-schema/232.sql deleted file mode 100644 index 102732a2fc..0000000000 --- a/sql-schema/232.sql +++ /dev/null @@ -1,2 +0,0 @@ -TRUNCATE `ipv4_mac`; - diff --git a/sql-schema/233.sql b/sql-schema/233.sql deleted file mode 100644 index 553bd3e35b..0000000000 --- a/sql-schema/233.sql +++ /dev/null @@ -1,2 +0,0 @@ -UPDATE `ipv4_mac` SET `context_name`='' WHERE `context_name` IS NULL; -ALTER TABLE `ipv4_mac` MODIFY `context_name` VARCHAR(128) NOT NULL; diff --git a/sql-schema/234.sql b/sql-schema/234.sql deleted file mode 100644 index c2e576031c..0000000000 --- a/sql-schema/234.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO `config` (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_group_order`,`config_sub_group`,`config_sub_group_order`,`config_hidden`,`config_disabled`) VALUES ('alert.default_copy','true','true','Copy all email alerts to default contact','alerting',0,'general',0,'0','0'); diff --git a/sql-schema/235.sql b/sql-schema/235.sql deleted file mode 100644 index 04f87bbb09..0000000000 --- a/sql-schema/235.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE users MODIFY password VARCHAR(255); diff --git a/sql-schema/236.sql b/sql-schema/236.sql deleted file mode 100644 index 354ccbbe7d..0000000000 --- a/sql-schema/236.sql +++ /dev/null @@ -1,4 +0,0 @@ -DROP INDEX device_id ON bgpPeers; -CREATE INDEX device_id ON bgpPeers (device_id, context_name); -DROP INDEX device_id ON bgpPeers_cbgp; -CREATE INDEX device_id ON bgpPeers_cbgp (device_id, bgpPeerIdentifier, context_name); diff --git a/sql-schema/237.sql b/sql-schema/237.sql deleted file mode 100644 index 07c1e09d9e..0000000000 --- a/sql-schema/237.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `ports_fdb` ADD COLUMN `ports_fdb_id` BIGINT(20) UNSIGNED PRIMARY KEY AUTO_INCREMENT FIRST; diff --git a/sql-schema/238.sql b/sql-schema/238.sql deleted file mode 100644 index 5bfe757192..0000000000 --- a/sql-schema/238.sql +++ /dev/null @@ -1,3 +0,0 @@ -INSERT INTO `config` (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_group_order`,`config_sub_group`,`config_sub_group_order`,`config_hidden`,`config_disabled`) VALUES('alert.transports.gitlab.host','','','GitLab URL','alerting','0','transports','0','0','0'); -INSERT INTO `config` (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_group_order`,`config_sub_group`,`config_sub_group_order`,`config_hidden`,`config_disabled`) VALUES('alert.transports.gitlab.project_id','','','GitLab Project ID','alerting','0','transports','0','0','0'); -INSERT INTO `config` (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_group_order`,`config_sub_group`,`config_sub_group_order`,`config_hidden`,`config_disabled`) VALUES('alert.transports.gitlab.key','','','GitLab Private Token','alerting','0','transports','0','0','0'); diff --git a/sql-schema/239.sql b/sql-schema/239.sql deleted file mode 100644 index 603e095e7d..0000000000 --- a/sql-schema/239.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `services` MODIFY `service_ds` TEXT NOT NULL; diff --git a/sql-schema/240.sql b/sql-schema/240.sql deleted file mode 100644 index 600f2b32f6..0000000000 --- a/sql-schema/240.sql +++ /dev/null @@ -1,3 +0,0 @@ -INSERT INTO `config` (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_group_order`,`config_sub_group`,`config_sub_group_order`,`config_hidden`,`config_disabled`) VALUES('alert.transports.hue.bridge','','','Philips Hue Bridge IP','alerting','0','transports','0','0','0'); -INSERT INTO `config` (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_group_order`,`config_sub_group`,`config_sub_group_order`,`config_hidden`,`config_disabled`) VALUES('alert.transports.hue.user','','','Philips Hue User','alerting','0','transports','0','0','0'); -INSERT INTO `config` (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_group_order`,`config_sub_group`,`config_sub_group_order`,`config_hidden`,`config_disabled`) VALUES('alert.transports.hue.duration','','lselect','Philips Hue Alert Duration','alerting','0','transports','0','0','0'); diff --git a/sql-schema/241.sql b/sql-schema/241.sql deleted file mode 100644 index 603e095e7d..0000000000 --- a/sql-schema/241.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `services` MODIFY `service_ds` TEXT NOT NULL; diff --git a/sql-schema/242.sql b/sql-schema/242.sql deleted file mode 100644 index 50d28a2639..0000000000 --- a/sql-schema/242.sql +++ /dev/null @@ -1,11 +0,0 @@ -ALTER TABLE `alert_rules` ADD `query_builder` TEXT NOT NULL AFTER `query`; -CREATE TABLE `alert_group_map` (`id` INT PRIMARY KEY AUTO_INCREMENT, `rule_id` INT NOT NULL, `group_id` INT NOT NULL); -CREATE UNIQUE INDEX `alert_group_map_rule_id_group_id_uindex` ON `alert_group_map` (`rule_id`, `group_id`); -INSERT INTO `alert_group_map` (`rule_id`, `group_id`) SELECT `rule`, SUBSTRING(`target`, 2) as `group_id` FROM `alert_map` WHERE `target` LIKE 'g%'; -DELETE FROM `alert_map` WHERE `target` LIKE 'g%'; -ALTER TABLE `alert_map` CHANGE `rule` `rule_id` INT(11) NOT NULL; -ALTER TABLE `alert_map` CHANGE `target` `device_id` INT(11) NOT NULL; -ALTER TABLE `alert_map` RENAME TO `alert_device_map`; -CREATE UNIQUE INDEX `alert_device_map_rule_id_device_id_uindex` ON `alert_device_map` (`rule_id`, `device_id`); -INSERT INTO `alert_device_map` (`rule_id`, `device_id`) SELECT `id`, `device_id` FROM `alert_rules` WHERE `device_id` != -1; -ALTER TABLE `alert_rules` DROP COLUMN `device_id`; diff --git a/sql-schema/243.sql b/sql-schema/243.sql deleted file mode 100644 index 2c2167d878..0000000000 --- a/sql-schema/243.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE alert_rules DROP query_builder; -ALTER TABLE alert_rules ADD builder TEXT NOT NULL AFTER query; diff --git a/sql-schema/244.sql b/sql-schema/244.sql deleted file mode 100644 index c1ae723341..0000000000 --- a/sql-schema/244.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE bills DROP INDEX `bill_id`, ADD PRIMARY KEY (bill_id); diff --git a/sql-schema/245.sql b/sql-schema/245.sql deleted file mode 100644 index 3987cad222..0000000000 --- a/sql-schema/245.sql +++ /dev/null @@ -1,5 +0,0 @@ -DELETE FROM `alert_device_map` WHERE `device_id` NOT IN (SELECT `device_id` FROM `devices`); -DELETE FROM `alert_device_map` WHERE `rule_id` NOT IN (SELECT `id` FROM `alert_rules`); -DELETE FROM `alert_group_map` WHERE `group_id` NOT IN (SELECT `group_id` FROM `device_groups`); -DELETE FROM `alert_group_map` WHERE `rule_id` NOT IN (SELECT `id` FROM `alert_rules`); - diff --git a/sql-schema/246.sql b/sql-schema/246.sql deleted file mode 100644 index e8e28e6d4f..0000000000 --- a/sql-schema/246.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `stp` MODIFY `rootPort` int(11); diff --git a/sql-schema/247.sql b/sql-schema/247.sql deleted file mode 100644 index 393dfb2655..0000000000 --- a/sql-schema/247.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO `config` (`config_name`,`config_value`,`config_default`,`config_descr`,`config_group`,`config_group_order`,`config_sub_group`,`config_sub_group_order`,`config_hidden`,`config_disabled`) VALUES ('alert.admins','true','true','Alert administrators','alerting',0,'general',0,'0','0'),('alert.default_only','true','true','Only alert default mail contact','alerting',0,'general',0,'0','0'),('alert.default_mail','','','The default mail contact','alerting',0,'general',0,'0','0'),('alert.transports.pagerduty','','','Pagerduty transport - put your API key here','alerting',0,'transports',0,'0','0'),('alert.pagerduty.account','','','Pagerduty account name','alerting',0,'transports',0,'0','0'),('alert.pagerduty.service','','','Pagerduty service name','alerting',0,'transports',0,'0','0'),('alert.tolerance_window','5','5','Tolerance window in seconds','alerting',0,'general',0,'0','0'),('email_backend','mail','mail','The backend to use for sending email, can be mail, sendmail or smtp','alerting',0,'general',0,'0','0'),('alert.transports.dummy','false','false','Dummy transport','alerting',0,'transports',0,'0','0'),('alert.transports.mail','true','true','Mail alerting transport','alerting',0,'transports',0,'0','0'),('alert.transports.irc','FALSE','false','IRC alerting transport','alerting',0,'transports',0,'0','0'),('alert.globals','true','TRUE','Alert read only administrators','alerting',0,'general',0,'0','0'),('email_from','NULL','NULL','Email address used for sending emails (from)','alerting',0,'general',0,'0','0'),('email_user','LibreNMS','LibreNMS','Name used as part of the from address','alerting',0,'general',0,'0','0'),('email_sendmail_path','/usr/sbin/sendmail','/usr/sbin/sendmail','Location of sendmail if using this option','alerting',0,'general',0,'0','0'),('email_smtp_host','localhost','localhost','SMTP Host for sending email if using this option','alerting',0,'general',0,'0','0'),('email_smtp_port','25','25','SMTP port setting','alerting',0,'general',0,'0','0'),('email_smtp_timeout','10','10','SMTP timeout setting','alerting',0,'general',0,'0','0'),('email_smtp_secure','','','Enable / disable encryption (use tls or ssl)','alerting',0,'general',0,'0','0'),('email_smtp_auth','false','FALSE','Enable / disable smtp authentication','alerting',0,'general',0,'0','0'),('email_smtp_username','NULL','NULL','SMTP Auth username','alerting',0,'general',0,'0','0'),('email_smtp_password','NULL','NULL','SMTP Auth password','alerting',0,'general',0,'0','0'),('alert.syscontact','true','TRUE','Issue alerts to sysContact','alerting',0,'general',0,'0','0'),('alert.fixed-contacts','true','TRUE','If TRUE any changes to sysContact or users emails will not be honoured whilst alert is active','alerting',0,'general',0,'0','0'),('alert.transports.nagios','','','Nagios compatible via FIFO','alerting',0,'transports',0,'0','0'); diff --git a/sql-schema/248.sql b/sql-schema/248.sql deleted file mode 100644 index 0c200256dc..0000000000 --- a/sql-schema/248.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `alerts` ADD `note` TEXT NOT NULL AFTER `open`; \ No newline at end of file diff --git a/sql-schema/249.sql b/sql-schema/249.sql deleted file mode 100644 index ffa7fa9f53..0000000000 --- a/sql-schema/249.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE alerts MODIFY note text; diff --git a/sql-schema/250.sql b/sql-schema/250.sql deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sql-schema/251.sql b/sql-schema/251.sql deleted file mode 100644 index 481cdf1768..0000000000 --- a/sql-schema/251.sql +++ /dev/null @@ -1 +0,0 @@ -DELETE FROM `graph_types` WHERE `graph_descr` = 'HTTP Server Connections Acitve'; diff --git a/sql-schema/252.sql b/sql-schema/252.sql deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sql-schema/253.sql b/sql-schema/253.sql deleted file mode 100644 index 6fd29bf598..0000000000 --- a/sql-schema/253.sql +++ /dev/null @@ -1,3 +0,0 @@ -CREATE TABLE `poller_cluster` (`id` int(11) NOT NULL AUTO_INCREMENT, `node_id` varchar(255) NOT NULL, `poller_name` varchar(255) NOT NULL, `poller_version` varchar(255) NOT NULL DEFAULT '', `poller_groups` varchar(255) NOT NULL DEFAULT '', `last_report` datetime NOT NULL, `master` tinyint(1) NOT NULL, PRIMARY KEY (`node_id`), UNIQUE KEY `id` (`id`)); -CREATE TABLE `poller_cluster_stats` (`id` int(11) NOT NULL AUTO_INCREMENT, `parent_poller` int(11) NOT NULL DEFAULT 0, `poller_type` varchar(64) NOT NULL DEFAULT '', `depth` int(11) unsigned NOT NULL, `devices` int(11) unsigned NOT NULL, `worker_seconds` double unsigned NOT NULL, `workers` int(11) unsigned NOT NULL, `frequency` int(11) unsigned NOT NULL, PRIMARY KEY (`parent_poller`,`poller_type`), UNIQUE KEY `id` (`id`)); - diff --git a/sql-schema/254.sql b/sql-schema/254.sql deleted file mode 100644 index 8811494751..0000000000 --- a/sql-schema/254.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `alert_templates` DROP `rule_id`; diff --git a/sql-schema/255.sql b/sql-schema/255.sql deleted file mode 100644 index 3cdf134da3..0000000000 --- a/sql-schema/255.sql +++ /dev/null @@ -1,4 +0,0 @@ -CREATE TABLE IF NOT EXISTS alert_transports (transport_id INT(11) NOT NULL AUTO_INCREMENT, transport_name VARCHAR(30) NOT NULL COLLATE utf8_unicode_ci, transport_type VARCHAR(20) NOT NULL DEFAULT 'mail', is_default BOOL NOT NULL DEFAULT false, transport_config TEXT, PRIMARY KEY(transport_id)); -CREATE TABLE IF NOT EXISTS alert_transport_map (id INT(11) NOT NULL AUTO_INCREMENT, rule_id INT(11) NOT NULL, transport_or_group_id INT(11) NOT NULL, target_type VARCHAR(16) NOT NULL, PRIMARY KEY(id)); -CREATE TABLE IF NOT EXISTS alert_transport_groups (transport_group_id INT(11) NOT NULL AUTO_INCREMENT, transport_group_name VARCHAR(30) NOT NULL COLLATE utf8_unicode_ci, PRIMARY KEY(transport_group_id)); -CREATE TABLE IF NOT EXISTS transport_group_transport (transport_group_id INT(11) NOT NULL, transport_id INT(11) NOT NULL); diff --git a/sql-schema/256.sql b/sql-schema/256.sql deleted file mode 100644 index 394f5d555a..0000000000 --- a/sql-schema/256.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `ports` MODIFY `ifInUcastPkts` BIGINT UNSIGNED, MODIFY `ifInUcastPkts_prev` BIGINT UNSIGNED, MODIFY `ifInUcastPkts_delta` BIGINT UNSIGNED, MODIFY `ifInUcastPkts_rate` BIGINT UNSIGNED, MODIFY `ifOutUcastPkts` BIGINT UNSIGNED, MODIFY `ifOutUcastPkts_prev` BIGINT UNSIGNED, MODIFY `ifOutUcastPkts_delta` BIGINT UNSIGNED, MODIFY `ifOutUcastPkts_rate` BIGINT UNSIGNED, MODIFY `ifInErrors` BIGINT UNSIGNED, MODIFY `ifInErrors_prev` BIGINT UNSIGNED, MODIFY `ifInErrors_delta` BIGINT UNSIGNED, MODIFY `ifInErrors_rate` BIGINT UNSIGNED, MODIFY `ifOutErrors` BIGINT UNSIGNED, MODIFY `ifOutErrors_prev` BIGINT UNSIGNED, MODIFY `ifOutErrors_delta` BIGINT UNSIGNED, MODIFY `ifOutErrors_rate` BIGINT UNSIGNED, MODIFY `ifInOctets` BIGINT UNSIGNED, MODIFY `ifInOctets_prev` BIGINT UNSIGNED, MODIFY `ifInOctets_delta` BIGINT UNSIGNED, MODIFY `ifInOctets_rate` BIGINT UNSIGNED, MODIFY `ifOutOctets` BIGINT UNSIGNED, MODIFY `ifOutOctets_prev` BIGINT UNSIGNED, MODIFY `ifOutOctets_delta` BIGINT UNSIGNED, MODIFY `ifOutOctets_rate` BIGINT UNSIGNED; diff --git a/sql-schema/257.sql b/sql-schema/257.sql deleted file mode 100644 index 9d6014c385..0000000000 --- a/sql-schema/257.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE devices ADD max_depth int DEFAULT 0 NOT NULL; diff --git a/sql-schema/258.sql b/sql-schema/258.sql deleted file mode 100644 index a7cce642fd..0000000000 --- a/sql-schema/258.sql +++ /dev/null @@ -1 +0,0 @@ -DROP TABLE IF EXISTS `port_association_mode`; diff --git a/sql-schema/259.sql b/sql-schema/259.sql deleted file mode 100644 index 783f8b085b..0000000000 --- a/sql-schema/259.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE application_metrics MODIFY value double; -ALTER TABLE application_metrics MODIFY value_prev double; diff --git a/sql-schema/260.sql b/sql-schema/260.sql deleted file mode 100644 index 89d5e6ae09..0000000000 --- a/sql-schema/260.sql +++ /dev/null @@ -1,9 +0,0 @@ -DELETE FROM ospf_instances WHERE context_name = ''; -DELETE FROM ospf_areas WHERE context_name = ''; -DELETE FROM ospf_ports WHERE context_name = ''; -DELETE FROM ospf_nbrs WHERE context_name = ''; -ALTER TABLE ospf_instances ADD id int auto_increment NULL PRIMARY KEY AUTO_INCREMENT FIRST; -ALTER TABLE ospf_areas ADD id int auto_increment NULL PRIMARY KEY AUTO_INCREMENT FIRST; -ALTER TABLE ospf_ports ADD id int auto_increment NULL PRIMARY KEY AUTO_INCREMENT FIRST; -ALTER TABLE ospf_nbrs ADD id int auto_increment NULL PRIMARY KEY AUTO_INCREMENT FIRST; -ALTER TABLE ospf_nbrs MODIFY port_id int(11); diff --git a/sql-schema/261.sql b/sql-schema/261.sql deleted file mode 100644 index 03106bea8f..0000000000 --- a/sql-schema/261.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `devices` CHANGE `bgpLocalAs` `bgpLocalAs` INT UNSIGNED NULL DEFAULT NULL; diff --git a/sql-schema/262.sql b/sql-schema/262.sql deleted file mode 100644 index 9743509d6b..0000000000 --- a/sql-schema/262.sql +++ /dev/null @@ -1 +0,0 @@ -INSERT INTO `config` (`config_name`, `config_value`, `config_default`, `config_descr`, `config_group`, `config_group_order`, `config_sub_group`, `config_sub_group_order`, `config_hidden`, `config_disabled`) VALUES('webui.dynamic_graphs', 'false', 'false', 'Enable dynamic graphs', 'webui', 0, 'graph', 0, '0', '0'); diff --git a/sql-schema/263.sql b/sql-schema/263.sql deleted file mode 100644 index 7f5d5174ff..0000000000 --- a/sql-schema/263.sql +++ /dev/null @@ -1,104 +0,0 @@ -ALTER TABLE `access_points` CHANGE `channel` `channel` tinyint(3) unsigned NOT NULL DEFAULT '0' ; -ALTER TABLE `bill_data` CHANGE `delta` `delta` bigint(20) NOT NULL ; -ALTER TABLE `bill_data` CHANGE `in_delta` `in_delta` bigint(20) NOT NULL ; -ALTER TABLE `bill_data` CHANGE `out_delta` `out_delta` bigint(20) NOT NULL ; -ALTER TABLE `component` CHANGE `id` `id` int(10) unsigned NOT NULL auto_increment; -ALTER TABLE `component` CHANGE `device_id` `device_id` int(10) unsigned NOT NULL ; -ALTER TABLE `component_prefs` CHANGE `id` `id` int(10) unsigned NOT NULL auto_increment; -ALTER TABLE `component_prefs` CHANGE `component` `component` int(10) unsigned NOT NULL ; -ALTER TABLE `component_statuslog` CHANGE `id` `id` int(10) unsigned NOT NULL auto_increment; -ALTER TABLE `component_statuslog` CHANGE `component_id` `component_id` int(10) unsigned NOT NULL ; -ALTER TABLE `dashboards` CHANGE `access` `access` tinyint(1) NOT NULL DEFAULT '0' ; -ALTER TABLE `devices` CHANGE `device_id` `device_id` int(10) unsigned NOT NULL auto_increment; -ALTER TABLE `devices` CHANGE `status` `status` tinyint(1) NOT NULL DEFAULT '0' ; -ALTER TABLE `devices` CHANGE `ignore` `ignore` tinyint(1) NOT NULL DEFAULT '0' ; -ALTER TABLE `devices_perms` DROP `access_level`; -ALTER TABLE `device_groups` CHANGE `id` `id` int(10) unsigned NOT NULL auto_increment; -ALTER TABLE `device_perf` CHANGE `id` `id` int(10) unsigned NOT NULL auto_increment; -ALTER TABLE `device_perf` CHANGE `xmt` `xmt` int(11) NOT NULL ; -ALTER TABLE `device_perf` CHANGE `rcv` `rcv` int(11) NOT NULL ; -ALTER TABLE `device_perf` CHANGE `loss` `loss` int(11) NOT NULL ; -ALTER TABLE `device_perf` CHANGE `min` `min` double(8,2) NOT NULL ; -ALTER TABLE `device_perf` CHANGE `max` `max` double(8,2) NOT NULL ; -ALTER TABLE `device_perf` CHANGE `avg` `avg` double(8,2) NOT NULL ; -ALTER TABLE `device_perf` ADD PRIMARY KEY (`id`); -ALTER TABLE `device_perf` DROP INDEX `id`; -ALTER TABLE `device_relationships` CHANGE `parent_device_id` `parent_device_id` int(10) unsigned NOT NULL DEFAULT '0' ; -ALTER TABLE `device_relationships` CHANGE `child_device_id` `child_device_id` int(10) unsigned NOT NULL ; -ALTER TABLE `eventlog` CHANGE `severity` `severity` tinyint(4) NULL DEFAULT '2' ; -ALTER TABLE `ipv4_addresses` DROP INDEX `interface_id_2`; -ALTER TABLE `ipv6_addresses` DROP INDEX `interface_id_2`; -ALTER TABLE `links` CHANGE `active` `active` tinyint(1) NOT NULL DEFAULT '1' ; -ALTER TABLE `locations` CHANGE `lat` `lat` double(10,6) NOT NULL ; -ALTER TABLE `locations` CHANGE `lng` `lng` double(10,6) NOT NULL ; -ALTER TABLE `locations` ADD PRIMARY KEY (`id`); -ALTER TABLE `locations` DROP INDEX `id`; -ALTER TABLE `mefinfo` CHANGE `mefID` `mefID` int(11) NOT NULL ; -ALTER TABLE `mefinfo` CHANGE `mefMTU` `mefMTU` int(11) NOT NULL DEFAULT '1500' ; -ALTER TABLE `mempools` CHANGE `mempool_used` `mempool_used` bigint(20) NOT NULL ; -ALTER TABLE `mempools` CHANGE `mempool_free` `mempool_free` bigint(20) NOT NULL ; -ALTER TABLE `mempools` CHANGE `mempool_total` `mempool_total` bigint(20) NOT NULL ; -ALTER TABLE `mempools` CHANGE `mempool_largestfree` `mempool_largestfree` bigint(20) NULL ; -ALTER TABLE `mempools` CHANGE `mempool_lowestfree` `mempool_lowestfree` bigint(20) NULL ; -ALTER TABLE `munin_plugins` CHANGE `mplug_total` `mplug_total` tinyint(1) NOT NULL DEFAULT '0' ; -ALTER TABLE `munin_plugins` CHANGE `mplug_graph` `mplug_graph` tinyint(1) NOT NULL DEFAULT '1' ; -ALTER TABLE `netscaler_vservers` CHANGE `vsvr_port` `vsvr_port` int(11) NOT NULL ; -ALTER TABLE `ports_fdb` CHANGE `port_id` `port_id` int(10) unsigned NOT NULL ; -ALTER TABLE `poller_cluster_stats` CHANGE `depth` `depth` int(10) unsigned NOT NULL ; -ALTER TABLE `poller_cluster_stats` CHANGE `devices` `devices` int(10) unsigned NOT NULL ; -ALTER TABLE `poller_cluster_stats` CHANGE `workers` `workers` int(10) unsigned NOT NULL ; -ALTER TABLE `poller_cluster_stats` CHANGE `frequency` `frequency` int(10) unsigned NOT NULL ; -ALTER TABLE `ports_fdb` CHANGE `vlan_id` `vlan_id` int(10) unsigned NOT NULL ; -ALTER TABLE `ports_fdb` CHANGE `device_id` `device_id` int(10) unsigned NOT NULL ; -ALTER TABLE `ports_perms` DROP `access_level`; -ALTER TABLE `ports_vlans` CHANGE `priority` `priority` bigint(20) NOT NULL ; -ALTER TABLE `ports_vlans` CHANGE `untagged` `untagged` tinyint(1) NOT NULL DEFAULT '0' ; -ALTER TABLE `processes` CHANGE `pid` `pid` int(11) NOT NULL ; -ALTER TABLE `processes` CHANGE `vsz` `vsz` int(11) NOT NULL ; -ALTER TABLE `processes` CHANGE `rss` `rss` int(11) NOT NULL ; -ALTER TABLE `processors` DROP INDEX `device_id_2`; -ALTER TABLE `route` CHANGE `ipRouteDest` `ipRouteDest` varchar(39) NOT NULL ; -ALTER TABLE `route` CHANGE `ipRouteNextHop` `ipRouteNextHop` varchar(39) NOT NULL ; -ALTER TABLE `sensors` CHANGE `device_id` `device_id` int(10) unsigned NOT NULL DEFAULT '0' ; -ALTER TABLE `sensors` CHANGE `sensor_current` `sensor_current` double NULL ; -ALTER TABLE `sensors` CHANGE `sensor_limit` `sensor_limit` double NULL ; -ALTER TABLE `sensors` CHANGE `sensor_limit_warn` `sensor_limit_warn` double NULL ; -ALTER TABLE `sensors` CHANGE `sensor_limit_low` `sensor_limit_low` double NULL ; -ALTER TABLE `sensors` CHANGE `sensor_limit_low_warn` `sensor_limit_low_warn` double NULL ; -ALTER TABLE `sensors` CHANGE `sensor_prev` `sensor_prev` double NULL ; -ALTER TABLE `state_translations` CHANGE `state_value` `state_value` smallint(6) NOT NULL DEFAULT '0' ; -ALTER TABLE `storage` DROP INDEX `device_id_2`; -ALTER TABLE `tnmsneinfo` CHANGE `neID` `neID` int(11) NOT NULL ; -ALTER TABLE `ucd_diskio` DROP INDEX `device_id_2`; -ALTER TABLE `users` CHANGE `can_modify_passwd` `can_modify_passwd` tinyint(1) NOT NULL DEFAULT '1' ; -ALTER TABLE `users_prefs` CHANGE `user_id` `user_id` int(11) NOT NULL ; -ALTER TABLE `users_prefs` DROP INDEX `user_id.pref`; -ALTER TABLE `users_prefs` ADD UNIQUE `users_prefs_user_id_pref_unique` (`user_id`,`pref`); -ALTER TABLE `wireless_sensors` CHANGE `device_id` `device_id` int(10) unsigned NOT NULL DEFAULT '0' ; -ALTER TABLE `wireless_sensors` CHANGE `sensor_current` `sensor_current` double NULL ; -ALTER TABLE `wireless_sensors` CHANGE `sensor_prev` `sensor_prev` double NULL ; -ALTER TABLE `wireless_sensors` CHANGE `sensor_limit` `sensor_limit` double NULL ; -ALTER TABLE `wireless_sensors` CHANGE `sensor_limit_warn` `sensor_limit_warn` double NULL ; -ALTER TABLE `wireless_sensors` CHANGE `sensor_limit_low` `sensor_limit_low` double NULL ; -ALTER TABLE `wireless_sensors` CHANGE `sensor_limit_low_warn` `sensor_limit_low_warn` double NULL ; -ALTER TABLE `pollers` MODIFY `id` int(11) NOT NULL; -ALTER TABLE `pollers` DROP INDEX `id`; -ALTER TABLE `pollers` DROP INDEX `PRIMARY`; -ALTER TABLE `pollers` ADD PRIMARY KEY (`id`); -ALTER TABLE `pollers` MODIFY `id` int(11) NOT NULL auto_increment; -ALTER TABLE `pollers` ADD UNIQUE `poller_name` (`poller_name`); -ALTER TABLE `poller_cluster` MODIFY `id` int(11) NOT NULL; -ALTER TABLE `poller_cluster` DROP INDEX `id`; -ALTER TABLE `poller_cluster` DROP INDEX `PRIMARY`; -ALTER TABLE `poller_cluster` ADD PRIMARY KEY (`id`); -ALTER TABLE `poller_cluster` MODIFY `id` int(11) NOT NULL auto_increment; -ALTER TABLE `poller_cluster` ADD UNIQUE `poller_cluster_node_id_unique` (`node_id`); -ALTER TABLE `poller_cluster_stats` MODIFY `id` int(11) NOT NULL; -ALTER TABLE `poller_cluster_stats` DROP INDEX `id`; -ALTER TABLE `poller_cluster_stats` DROP INDEX `PRIMARY`; -ALTER TABLE `poller_cluster_stats` ADD PRIMARY KEY (`id`); -ALTER TABLE `poller_cluster_stats` MODIFY `id` int(11) NOT NULL auto_increment; -ALTER TABLE `poller_cluster_stats` ADD UNIQUE `parent_poller_poller_type` (`parent_poller`, `poller_type`); -ALTER TABLE `poller_cluster_stats` CHANGE `parent_poller` `parent_poller` int(11) NOT NULL DEFAULT 0 ; -ALTER TABLE `poller_cluster_stats` CHANGE `poller_type` `poller_type` varchar(64) NOT NULL DEFAULT '' ; - diff --git a/sql-schema/264.sql b/sql-schema/264.sql deleted file mode 100644 index 7aaf2a3e0a..0000000000 --- a/sql-schema/264.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `pdb_ix_peers` CHANGE `remote_asn` `remote_asn` INT UNSIGNED NOT NULL; diff --git a/sql-schema/265.sql b/sql-schema/265.sql deleted file mode 100644 index 21368cb804..0000000000 --- a/sql-schema/265.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `devices` CHANGE `last_ping_timetaken` `last_ping_timetaken` double(8,2) NULL; diff --git a/sql-schema/266.sql b/sql-schema/266.sql deleted file mode 100644 index e6498db546..0000000000 --- a/sql-schema/266.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `bgpPeers` ADD `bgpPeerDescr` VARCHAR(255) NOT NULL DEFAULT '' AFTER `bgpPeerRemoteAddr`; \ No newline at end of file diff --git a/sql-schema/267.sql b/sql-schema/267.sql deleted file mode 100644 index 02f8bd0b12..0000000000 --- a/sql-schema/267.sql +++ /dev/null @@ -1,5 +0,0 @@ -ALTER TABLE users ADD auth_type varchar(32) NULL after user_id; -ALTER TABLE users ADD auth_id int NULL after auth_type; -DROP INDEX username ON users; -CREATE UNIQUE INDEX username ON users (auth_type, username); -UPDATE users SET auth_id = user_id; diff --git a/sql-schema/268.sql b/sql-schema/268.sql deleted file mode 100644 index 73d1bf481c..0000000000 --- a/sql-schema/268.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `alerts` ADD `info` TEXT NOT NULL; -INSERT INTO `config` (`config_name`, `config_value`, `config_default`, `config_descr`, `config_group`, `config_group_order`, `config_sub_group`, `config_sub_group_order`, `config_hidden`, `config_disabled`) VALUES('alert.ack_until_clear', 'false', 'false', 'Default acknowledge until alert clears', 'alerting', 0, 'general', 0, '0', '0'); diff --git a/sql-schema/269.sql b/sql-schema/269.sql deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/sql-schema/270.sql b/sql-schema/270.sql deleted file mode 100644 index 91e77f965d..0000000000 --- a/sql-schema/270.sql +++ /dev/null @@ -1 +0,0 @@ -update graph_types set graph_subtype = 'bigip_apm_sessions' where graph_subtype = 'apm_sessions'; diff --git a/sql-schema/271.sql b/sql-schema/271.sql deleted file mode 100644 index e41946a9f4..0000000000 --- a/sql-schema/271.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `device_perf` ADD `debug` TEXT NULL; diff --git a/sql-schema/272.sql b/sql-schema/272.sql deleted file mode 100644 index a24bf732be..0000000000 --- a/sql-schema/272.sql +++ /dev/null @@ -1,17 +0,0 @@ -ALTER TABLE devices ADD location_id int NULL AFTER location; -ALTER TABLE locations MODIFY lat double(10,6); -ALTER TABLE locations MODIFY lng double(10,6); -ALTER TABLE locations MODIFY location varchar(255) NOT NULL; - -INSERT INTO locations (location, timestamp) SELECT devices.location, NOW() FROM devices WHERE devices.location IS NOT NULL AND NOT EXISTS (SELECT location FROM locations WHERE location = devices.location); -DELETE t1 FROM locations t1 INNER JOIN locations t2 WHERE t1.id < t2.id AND t1.location = t2.location; -CREATE UNIQUE INDEX locations_location_uindex ON locations (location); - -UPDATE devices INNER JOIN locations ON devices.location = locations.location SET devices.location_id = locations.id; -ALTER TABLE devices DROP location; - -UPDATE alert_rules SET builder=REPLACE(builder, 'devices.location', 'locations.location'); -UPDATE device_groups SET pattern=REPLACE(pattern, 'devices.location', 'locations.location'); - -INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('geoloc.engine','','','Geocoding Engine','external',0,'location',0,'0','0'); -INSERT INTO config (config_name,config_value,config_default,config_descr,config_group,config_group_order,config_sub_group,config_sub_group_order,config_hidden,config_disabled) values ('geoloc.api_key','','','Geocoding API Key (Required to function)','external',0,'location',0,'0','0'); diff --git a/sql-schema/273.sql b/sql-schema/273.sql deleted file mode 100644 index 1022c561b7..0000000000 --- a/sql-schema/273.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE `syslog` ADD KEY `device_id-timestamp` (`device_id`,`timestamp`); diff --git a/sql-schema/274.sql b/sql-schema/274.sql deleted file mode 100644 index 65dbf13ab5..0000000000 --- a/sql-schema/274.sql +++ /dev/null @@ -1,3 +0,0 @@ -CREATE TABLE ports_nac (ports_nac_id int(10) unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT, auth_id varchar(50) NOT NULL, device_id int(11) unsigned NOT NULL, port_id int(11) NOT NULL, domain varchar(50) NOT NULL, username varchar(50) NOT NULL, mac_address varchar(50) NOT NULL, ip_address varchar(50) NOT NULL, host_mode varchar(50) NOT NULL, authz_status varchar(50) NOT NULL, authz_by varchar(50) NOT NULL, authc_status varchar(50) NOT NULL, method varchar(50) NOT NULL, timeout varchar(50) NOT NULL, time_left varchar(50) NOT NULL); -CREATE INDEX ports_nac_device_id_index ON ports_nac (device_id); -CREATE INDEX ports_nac_port_id_mac_address_index ON ports_nac (port_id, mac_address); diff --git a/sql-schema/275.sql b/sql-schema/275.sql deleted file mode 100644 index a03c9aeb35..0000000000 --- a/sql-schema/275.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `ports_nac` CHANGE `device_id` `device_id` int(10) unsigned NOT NULL ; - diff --git a/sql-schema/276.sql b/sql-schema/276.sql deleted file mode 100644 index 12786812cb..0000000000 --- a/sql-schema/276.sql +++ /dev/null @@ -1,2 +0,0 @@ -DELETE FROM dashboards WHERE user_id NOT IN (SELECT user_id FROM users) AND dashboard_id NOT IN (SELECT DISTINCT dashboard_id FROM users_widgets); -UPDATE dashboards SET user_id = (SELECT user_id FROM users WHERE level = 10 LIMIT 1) WHERE user_id NOT IN (SELECT user_id FROM users); diff --git a/sql-schema/277.sql b/sql-schema/277.sql deleted file mode 100644 index 818c7322a3..0000000000 --- a/sql-schema/277.sql +++ /dev/null @@ -1,7 +0,0 @@ -ALTER TABLE alert_schedule_items ADD alert_schedulable_type varchar(255) NOT NULL; -UPDATE alert_schedule_items SET alert_schedulable_type = 'device_group' WHERE target LIKE 'g%'; -UPDATE alert_schedule_items SET alert_schedulable_type = 'device' WHERE alert_schedulable_type=''; -UPDATE alert_schedule_items SET target = SUBSTRING(target, 2) WHERE target LIKE 'g%'; -ALTER TABLE alert_schedule_items CHANGE target alert_schedulable_id int(11) unsigned NOT NULL; -ALTER TABLE alert_schedule_items RENAME TO alert_schedulables; -CREATE INDEX `schedulable_morph_index` ON alert_schedulables (alert_schedulable_type, alert_schedulable_id); diff --git a/sql-schema/278.sql b/sql-schema/278.sql deleted file mode 100644 index eabed41f8e..0000000000 --- a/sql-schema/278.sql +++ /dev/null @@ -1,125 +0,0 @@ -alter table access_points modify accesspoint_id int unsigned auto_increment, modify device_id int unsigned not null; -alter table alert_device_map modify id int unsigned auto_increment, modify device_id int unsigned not null, modify rule_id int unsigned not null; -alter table alert_group_map modify id int unsigned auto_increment, modify rule_id int unsigned not null, modify group_id int unsigned not null; -alter table alert_log modify id int unsigned auto_increment, modify rule_id int unsigned not null, modify device_id int unsigned not null; -alter table alert_rules modify id int unsigned auto_increment; -alter table alert_schedulables modify item_id int unsigned auto_increment, modify schedule_id int unsigned not null, modify alert_schedulable_id int unsigned not null; -alter table alert_schedule modify schedule_id int unsigned auto_increment; -alter table alert_template_map modify id int unsigned auto_increment, modify alert_templates_id int unsigned not null, modify alert_rule_id int unsigned not null; -alter table alert_templates modify id int unsigned auto_increment; -alter table alert_transport_groups modify transport_group_id int unsigned auto_increment; -alter table alert_transport_map modify id int unsigned auto_increment, modify rule_id int unsigned not null, modify transport_or_group_id int unsigned not null; -alter table alert_transports modify transport_id int unsigned auto_increment; -alter table alerts modify id int unsigned auto_increment, modify device_id int unsigned not null, modify rule_id int unsigned not null; -alter table api_tokens modify id int unsigned auto_increment, modify user_id int unsigned not null; -alter table application_metrics modify app_id int unsigned not null; -alter table applications modify app_id int unsigned auto_increment, modify device_id int unsigned not null; -alter table authlog modify id int unsigned auto_increment; -alter table bgpPeers modify bgpPeer_id int unsigned auto_increment, modify device_id int unsigned not null; -alter table bgpPeers_cbgp modify device_id int unsigned not null; -alter table bill_data modify bill_id int unsigned not null; -alter table bill_history modify bill_hist_id int unsigned auto_increment, modify bill_id int unsigned not null; -alter table bill_perms modify user_id int unsigned not null, modify bill_id int unsigned not null; -alter table bill_port_counters modify port_id int unsigned not null, modify bill_id int unsigned not null; -alter table bill_ports modify bill_id int unsigned not null, modify port_id int unsigned not null; -alter table bills modify bill_id int unsigned auto_increment; -alter table callback modify callback_id int unsigned auto_increment; -alter table cef_switching modify cef_switching_id int unsigned auto_increment, modify device_id int unsigned not null, modify updated int unsigned not null, modify updated_prev int unsigned not null; -alter table ciscoASA modify ciscoASA_id int unsigned auto_increment, modify device_id int unsigned not null; -alter table config modify config_id int unsigned auto_increment; -alter table customers modify customer_id int unsigned auto_increment; -alter table dashboards modify dashboard_id int unsigned auto_increment, modify user_id int unsigned default 0 not null; -alter table device_graphs modify device_id int unsigned not null; -alter table device_mibs modify device_id int unsigned not null; -alter table device_oids modify device_id int unsigned not null; -alter table device_perf modify device_id int unsigned not null; -alter table devices modify location_id int unsigned null, modify agent_uptime int unsigned default 0 not null; -alter table devices_attribs modify attrib_id int unsigned auto_increment, modify device_id int unsigned not null; -alter table devices_perms modify user_id int unsigned not null, modify device_id int unsigned not null; -alter table entityState modify entity_state_id int unsigned auto_increment, modify device_id int unsigned null, modify entPhysical_id int unsigned null; -alter table entPhysical modify entPhysical_id int unsigned auto_increment, modify device_id int unsigned not null; -alter table entPhysical_state modify device_id int unsigned not null; -alter table eventlog modify event_id int unsigned auto_increment, modify device_id int unsigned not null; -alter table hrDevice modify hrDevice_id int unsigned auto_increment, modify device_id int unsigned not null; -alter table ipsec_tunnels modify tunnel_id int unsigned auto_increment, modify device_id int unsigned not null, modify peer_port int unsigned not null, modify local_port int unsigned not null; -alter table ipv4_addresses modify ipv4_address_id int unsigned auto_increment, modify port_id int unsigned not null; -alter table ipv4_mac modify port_id int unsigned not null, modify device_id int unsigned null; -alter table ipv4_networks modify ipv4_network_id int unsigned auto_increment; -alter table ipv6_addresses modify ipv6_address_id int unsigned auto_increment, modify port_id int unsigned not null; -alter table ipv6_networks modify ipv6_network_id int unsigned auto_increment; -alter table juniAtmVp modify juniAtmVp_id int unsigned not null, modify port_id int unsigned not null, modify vp_id int unsigned not null; -alter table links modify id int unsigned auto_increment, modify local_port_id int unsigned null, modify local_device_id int unsigned not null, modify remote_port_id int unsigned null, modify remote_device_id int unsigned not null; -alter table loadbalancer_rservers modify rserver_id int unsigned auto_increment, modify device_id int unsigned not null; -alter table loadbalancer_vservers modify classmap_id int unsigned not null, modify device_id int unsigned not null; -alter table locations modify id int unsigned auto_increment; -alter table mac_accounting modify ma_id int unsigned auto_increment, modify port_id int unsigned not null, modify poll_time int unsigned null, modify poll_prev int unsigned null, modify poll_period int unsigned null; -alter table mefinfo modify id int unsigned auto_increment, modify device_id int unsigned not null; -alter table mempools modify mempool_id int unsigned auto_increment, modify device_id int unsigned not null; -alter table munin_plugins modify mplug_id int unsigned auto_increment, modify device_id int unsigned not null; -alter table munin_plugins_ds modify mplug_id int unsigned not null; -alter table netscaler_vservers modify vsvr_id int unsigned auto_increment, modify device_id int unsigned not null; -alter table notifications modify notifications_id int unsigned auto_increment; -alter table notifications_attribs modify attrib_id int unsigned auto_increment, modify notifications_id int unsigned not null, modify user_id int unsigned not null; -alter table ospf_areas modify id int unsigned auto_increment, modify device_id int unsigned not null; -alter table ospf_instances modify id int unsigned auto_increment, modify device_id int unsigned not null, modify ospf_instance_id int unsigned not null; -alter table ospf_nbrs modify id int unsigned auto_increment, modify device_id int unsigned not null, modify port_id int unsigned null; -alter table ospf_ports modify id int unsigned auto_increment, modify device_id int unsigned not null, modify port_id int unsigned not null; -alter table packages modify pkg_id int unsigned auto_increment, modify device_id int unsigned not null; -alter table perf_times modify id int unsigned auto_increment, modify devices int unsigned not null, modify start int unsigned not null; -alter table plugins modify plugin_id int unsigned auto_increment; -alter table poller_cluster modify id int unsigned auto_increment; -alter table poller_cluster_stats modify id int unsigned auto_increment, modify parent_poller int unsigned default 0 not null; -alter table poller_groups modify id int unsigned auto_increment; -alter table pollers modify id int unsigned auto_increment, modify devices int unsigned not null; -alter table ports modify port_id int unsigned auto_increment, modify device_id int unsigned default 0 not null, modify poll_time int unsigned null, modify poll_prev int unsigned null, modify poll_period int unsigned null; -alter table ports_adsl modify port_id int unsigned not null; -alter table ports_nac modify port_id int unsigned not null; -alter table ports_perms modify user_id int unsigned not null, modify port_id int unsigned not null; -alter table ports_stack modify device_id int unsigned not null, modify port_id_high int unsigned not null, modify port_id_low int unsigned not null; -alter table ports_statistics modify port_id int unsigned not null; -alter table ports_stp modify port_stp_id int unsigned auto_increment, modify device_id int unsigned not null, modify port_id int unsigned not null; -alter table ports_vlans modify port_vlan_id int unsigned auto_increment, modify device_id int unsigned not null, modify port_id int unsigned not null; -alter table processes modify device_id int unsigned not null; -alter table processors modify processor_id int unsigned auto_increment, modify device_id int unsigned not null; -alter table proxmox modify id int unsigned auto_increment; -alter table proxmox modify device_id int unsigned default 0 not null; -alter table proxmox_ports modify id int unsigned auto_increment; -alter table pseudowires modify pseudowire_id int unsigned auto_increment, modify device_id int unsigned not null, modify port_id int unsigned not null, modify peer_device_id int unsigned not null; -alter table route modify device_id int unsigned not null, modify discoveredAt int unsigned not null; -alter table sensors_to_state_indexes modify sensors_to_state_translations_id int unsigned auto_increment; -alter table services modify service_id int unsigned auto_increment, modify device_id int unsigned not null, modify service_changed int unsigned default 0 not null; -alter table session modify session_id int unsigned auto_increment; -alter table slas modify sla_id int unsigned auto_increment, modify device_id int unsigned not null; -alter table state_translations modify state_translation_id int unsigned auto_increment, modify state_index_id int unsigned not null; -alter table storage modify storage_id int unsigned auto_increment, modify device_id int unsigned not null; -alter table stp modify stp_id int unsigned auto_increment, modify device_id int unsigned not null; -alter table syslog modify device_id int unsigned null; -alter table tnmsneinfo modify id int unsigned auto_increment, modify device_id int unsigned not null; -alter table toner modify toner_id int unsigned auto_increment, modify device_id int unsigned default 0 not null; -alter table transport_group_transport modify transport_group_id int unsigned not null, modify transport_id int unsigned not null; -alter table ucd_diskio modify diskio_id int unsigned auto_increment, modify device_id int unsigned not null; -alter table users modify user_id int unsigned auto_increment; -alter table users_prefs modify user_id int unsigned not null; -alter table users_widgets modify user_widget_id int unsigned auto_increment, modify user_id int unsigned not null, modify widget_id int unsigned not null, modify dashboard_id int unsigned not null; -alter table vlans modify vlan_id int unsigned auto_increment, modify device_id int unsigned null; -alter table vminfo modify id int unsigned auto_increment, modify device_id int unsigned not null; -alter table vrf_lite_cisco modify vrf_lite_cisco_id int unsigned auto_increment, modify device_id int unsigned not null; -alter table vrfs modify vrf_id int unsigned auto_increment, modify device_id int unsigned not null; -alter table widgets modify widget_id int unsigned auto_increment; -alter table wireless_sensors modify sensor_id int unsigned auto_increment, modify access_point_id int unsigned null; - -LOCK TABLES sensors WRITE, sensors_to_state_indexes WRITE, state_indexes WRITE; - -SELECT COUNT(*) INTO @ibfk_1_EXISTS FROM `information_schema`.`table_constraints` WHERE `table_name` = 'sensors_to_state_indexes' AND `constraint_name` = 'sensors_to_state_indexes_ibfk_1' AND `constraint_type` = 'FOREIGN KEY'; SET @statement1 := IF(@ibfk_1_EXISTS > 0, 'ALTER TABLE sensors_to_state_indexes DROP FOREIGN KEY sensors_to_state_indexes_ibfk_1', 'SELECT "info: foreign key sensors_to_state_indexes_ibfk_1 does not exist."'); PREPARE statement1 FROM @statement1; EXECUTE statement1; -SELECT COUNT(*) INTO @ibfk_2_EXISTS FROM `information_schema`.`table_constraints` WHERE `table_name` = 'sensors_to_state_indexes' AND `constraint_name` = 'sensors_to_state_indexes_ibfk_2' AND `constraint_type` = 'FOREIGN KEY'; SET @statement2 := IF(@ibfk_2_EXISTS > 0, 'ALTER TABLE sensors_to_state_indexes DROP FOREIGN KEY sensors_to_state_indexes_ibfk_2', 'SELECT "info: foreign key sensors_to_state_indexes_ibfk_2 does not exist."'); PREPARE statement2 FROM @statement2; EXECUTE statement2; -SELECT COUNT(*) INTO @ibfk_3_EXISTS FROM `information_schema`.`table_constraints` WHERE `table_name` = 'sensors_to_state_indexes' AND `constraint_name` = 'sensors_to_state_indexes_ibfk_3' AND `constraint_type` = 'FOREIGN KEY'; SET @statement3 := IF(@ibfk_3_EXISTS > 0, 'ALTER TABLE sensors_to_state_indexes DROP FOREIGN KEY sensors_to_state_indexes_ibfk_3', 'SELECT "info: foreign key sensors_to_state_indexes_ibfk_3 does not exist."'); PREPARE statement3 FROM @statement3; EXECUTE statement3; -SELECT COUNT(*) INTO @ibfk_4_EXISTS FROM `information_schema`.`table_constraints` WHERE `table_name` = 'sensors_to_state_indexes' AND `constraint_name` = 'sensors_to_state_indexes_ibfk_4' AND `constraint_type` = 'FOREIGN KEY'; SET @statement4 := IF(@ibfk_4_EXISTS > 0, 'ALTER TABLE sensors_to_state_indexes DROP FOREIGN KEY sensors_to_state_indexes_ibfk_4', 'SELECT "info: foreign key sensors_to_state_indexes_ibfk_4 does not exist."'); PREPARE statement4 FROM @statement4; EXECUTE statement4; -SELECT COUNT(*) INTO @ibfk_5_EXISTS FROM `information_schema`.`table_constraints` WHERE `table_name` = 'sensors_to_state_indexes' AND `constraint_name` = 'sensors_to_state_indexes_ibfk_5' AND `constraint_type` = 'FOREIGN KEY'; SET @statement5 := IF(@ibfk_5_EXISTS > 0, 'ALTER TABLE sensors_to_state_indexes DROP FOREIGN KEY sensors_to_state_indexes_ibfk_5', 'SELECT "info: foreign key sensors_to_state_indexes_ibfk_5 does not exist."'); PREPARE statement5 FROM @statement5; EXECUTE statement5; -SELECT COUNT(*) INTO @sensor_id_foreign_EXISTS FROM `information_schema`.`table_constraints` WHERE `table_name` = 'sensors_to_state_indexes' AND `constraint_name` = 'sensors_to_state_indexes_sensor_id_foreign' AND `constraint_type` = 'FOREIGN KEY'; SET @statement0 := IF(@sensor_id_foreign_EXISTS > 0, 'ALTER TABLE sensors_to_state_indexes DROP FOREIGN KEY sensors_to_state_indexes_sensor_id_foreign', 'SELECT "info: foreign key sensors_to_state_indexes_sensor_id_foreign does not exist."'); PREPARE statement0 FROM @statement0; EXECUTE statement0; - -alter table sensors modify sensor_id int unsigned auto_increment; -alter table sensors_to_state_indexes modify sensor_id int unsigned not null, modify state_index_id int unsigned not null; -alter table state_indexes modify state_index_id int unsigned auto_increment; -ALTER TABLE `sensors_to_state_indexes` ADD CONSTRAINT `sensors_to_state_indexes_ibfk_1` FOREIGN KEY (`state_index_id`) REFERENCES `state_indexes`(`state_index_id`) ON DELETE RESTRICT ON UPDATE RESTRICT; -ALTER TABLE `sensors_to_state_indexes` ADD CONSTRAINT `sensors_to_state_indexes_sensor_id_foreign` FOREIGN KEY (`sensor_id`) REFERENCES `sensors` (`sensor_id`) ON DELETE CASCADE; -UNLOCK TABLES; diff --git a/sql-schema/279.sql b/sql-schema/279.sql deleted file mode 100644 index 838ff83197..0000000000 --- a/sql-schema/279.sql +++ /dev/null @@ -1 +0,0 @@ -drop table graph_types_dead; diff --git a/sql-schema/280.sql b/sql-schema/280.sql deleted file mode 100644 index 1fe1f263e1..0000000000 --- a/sql-schema/280.sql +++ /dev/null @@ -1,5 +0,0 @@ -alter table eventlog modify device_id int unsigned null; -alter table eventlog modify reference varchar(64) null; -alter table eventlog modify severity tinyint default 2 not null; -drop index host on eventlog; -alter table eventlog drop column host; diff --git a/sql-schema/281.sql b/sql-schema/281.sql deleted file mode 100644 index f54ac96cf3..0000000000 --- a/sql-schema/281.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE sensors ADD `group` varchar(255) NULL AFTER sensor_descr; - diff --git a/tests/DBSetupTest.php b/tests/DBSetupTest.php index 856fb7f6c6..77c7d11545 100644 --- a/tests/DBSetupTest.php +++ b/tests/DBSetupTest.php @@ -51,13 +51,7 @@ class DBSetupTest extends DBTestCase $this->assertSame(0, $result, 'Errors loading DB Schema: ' . Artisan::output()); } - public function testSchemaFiles(): void - { - $files = glob(base_path('/sql-schema/*.sql')); - $this->assertCount(282, $files, 'You should not create new legacy schema files.'); - } - - public function testSchema(): void + public function testSchema() { $files = array_map(function ($migration_file) { return basename($migration_file, '.php'); @@ -66,12 +60,6 @@ class DBSetupTest extends DBTestCase sort($files); sort($migrated); $this->assertEquals($files, $migrated, 'List of run migrations did not match existing migration files.'); - - // check legacy schema version is 1000 - $schema = DB::connection($this->connection)->table('dbSchema') - ->orderBy('version', 'DESC') - ->value('version'); - $this->assertEquals(1000, $schema, 'Seed not run, after seed legacy dbSchema should be 1000'); } public function testCheckDBCollation(): void