Giter VIP home page Giter VIP logo

Comments (4)

murrant avatar murrant commented on June 4, 2024

@wriedel somehow you interrupted the migration the first time...

from librenms.

wriedel avatar wriedel commented on June 4, 2024

@wriedel somehow you interrupted the migration the first time...
it's runnning on daily autoupdate so not sure about.
Any recommendation on how to enforce the update?

sudo -u librenms /opt/librenms/lnms migrate --force -vvv
SQL[select table_name as name, (data_length + index_length) as size, table_comment as comment, engine as engine, table_collation as collation from information_schema.tables where table_schema = 'libre_db' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED') order by table_name [] 3.16ms]

SQL[select table_name as name, (data_length + index_length) as size, table_comment as comment, engine as engine, table_collation as collation from information_schema.tables where table_schema = 'libre_db' and table_type in ('BASE TABLE', 'SYSTEM VERSIONED') order by table_name [] 2.24ms]

SQL[select migration from migrations order by batch asc, migration asc [] 1.05ms]

SQL[select migration from migrations order by batch asc, migration asc [] 2.05ms]

SQL[select max(batch) as aggregate from migrations [] 0.39ms]

INFO Running migrations.

2024_01_09_223917_bill_data_new_primary SQL[select column_name as name, data_type as type_name, column_type as type, collation_name as collation, is_nullable as nullable, column_default as default, column_comment as comment, extra as extra from information_schema.columns where table_schema = 'libre_db' and table_name = 'bill_data' order by ordinal_position asc [] 1.97ms]

................................................................................................. 6ms FAIL
SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP INDEX PRIMARY; check that it exists (Connection: mysql, SQL: alter table bill_data drop primary key) {"exception":"[object] (Illuminate\Database\QueryException(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP INDEX PRIMARY; check that it exists (Connection: mysql, SQL: alter table bill_data drop primary key) at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:822)
[previous exception] [object] (PDOException(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP INDEX PRIMARY; check that it exists at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:580)"}

In Connection.php line 822:

[Illuminate\Database\QueryException (42000)]
SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP INDEX PRIMARY; check that it exists (Connection: mysql, SQL: alter table bill_data drop primary key)

Exception trace:
at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:822
Illuminate\Database\Connection->runQueryCallback() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:776
Illuminate\Database\Connection->run() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:569
Illuminate\Database\Connection->statement() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php:110
Illuminate\Database\Schema\Blueprint->build() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php:555
Illuminate\Database\Schema\Builder->build() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php:397
Illuminate\Database\Schema\Builder->table() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:355
Illuminate\Support\Facades\Facade::__callStatic() at /opt/librenms/database/migrations/2024_01_09_223917_bill_data_new_primary.php:15
Illuminate\Database\Migrations\Migration@anonymous/opt/librenms/database/migrations/2024_01_09_223917_bill_data_new_primary.php:7$1db->up() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:493
Illuminate\Database\Migrations\Migrator->runMethod() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:410
Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations{closure}() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:419
Illuminate\Database\Migrations\Migrator->runMigration() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:216
Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations{closure}() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Console/View/Components/Task.php:37
Illuminate\Console\View\Components\Task->render() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:756
Illuminate\Database\Migrations\Migrator->write() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:216
Illuminate\Database\Migrations\Migrator->runUp() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:181
Illuminate\Database\Migrations\Migrator->runPending() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:124
Illuminate\Database\Migrations\Migrator->run() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:90
Illuminate\Database\Console\Migrations\MigrateCommand->Illuminate\Database\Console\Migrations{closure}() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:633
Illuminate\Database\Migrations\Migrator->usingConnection() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:83
Illuminate\Database\Console\Migrations\MigrateCommand->handle() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36
Illuminate\Container\BoundMethod::Illuminate\Container{closure}() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Util.php:41
Illuminate\Container\Util::unwrapIfClosure() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93
Illuminate\Container\BoundMethod::callBoundMethod() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:35
Illuminate\Container\BoundMethod::call() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php:662
Illuminate\Container\Container->call() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Console/Command.php:211
Illuminate\Console\Command->execute() at /opt/librenms/vendor/symfony/console/Command/Command.php:326
Symfony\Component\Console\Command\Command->run() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Console/Command.php:180
Illuminate\Console\Command->run() at /opt/librenms/vendor/symfony/console/Application.php:1096
Symfony\Component\Console\Application->doRunCommand() at /opt/librenms/vendor/symfony/console/Application.php:324
Symfony\Component\Console\Application->doRun() at /opt/librenms/vendor/symfony/console/Application.php:175
Symfony\Component\Console\Application->run() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:201
Illuminate\Foundation\Console\Kernel->handle() at /opt/librenms/app/Console/Kernel.php:66
App\Console\Kernel->handle() at /opt/librenms/lnms:38

In Connection.php line 580:

[PDOException (42000)]
SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP INDEX PRIMARY; check that it exists

Exception trace:
at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:580
PDOStatement->execute() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:580
Illuminate\Database\Connection->Illuminate\Database{closure}() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:809
Illuminate\Database\Connection->runQueryCallback() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:776
Illuminate\Database\Connection->run() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:569
Illuminate\Database\Connection->statement() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php:110
Illuminate\Database\Schema\Blueprint->build() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php:555
Illuminate\Database\Schema\Builder->build() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php:397
Illuminate\Database\Schema\Builder->table() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:355
Illuminate\Support\Facades\Facade::__callStatic() at /opt/librenms/database/migrations/2024_01_09_223917_bill_data_new_primary.php:15
Illuminate\Database\Migrations\Migration@anonymous/opt/librenms/database/migrations/2024_01_09_223917_bill_data_new_primary.php:7$1db->up() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:493
Illuminate\Database\Migrations\Migrator->runMethod() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:410
Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations{closure}() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:419
Illuminate\Database\Migrations\Migrator->runMigration() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:216
Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations{closure}() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Console/View/Components/Task.php:37
Illuminate\Console\View\Components\Task->render() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:756
Illuminate\Database\Migrations\Migrator->write() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:216
Illuminate\Database\Migrations\Migrator->runUp() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:181
Illuminate\Database\Migrations\Migrator->runPending() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:124
Illuminate\Database\Migrations\Migrator->run() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:90
Illuminate\Database\Console\Migrations\MigrateCommand->Illuminate\Database\Console\Migrations{closure}() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:633
Illuminate\Database\Migrations\Migrator->usingConnection() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:83
Illuminate\Database\Console\Migrations\MigrateCommand->handle() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36
Illuminate\Container\BoundMethod::Illuminate\Container{closure}() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Util.php:41
Illuminate\Container\Util::unwrapIfClosure() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93
Illuminate\Container\BoundMethod::callBoundMethod() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:35
Illuminate\Container\BoundMethod::call() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Container/Container.php:662
Illuminate\Container\Container->call() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Console/Command.php:211
Illuminate\Console\Command->execute() at /opt/librenms/vendor/symfony/console/Command/Command.php:326
Symfony\Component\Console\Command\Command->run() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Console/Command.php:180
Illuminate\Console\Command->run() at /opt/librenms/vendor/symfony/console/Application.php:1096
Symfony\Component\Console\Application->doRunCommand() at /opt/librenms/vendor/symfony/console/Application.php:324
Symfony\Component\Console\Application->doRun() at /opt/librenms/vendor/symfony/console/Application.php:175
Symfony\Component\Console\Application->run() at /opt/librenms/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:201
Illuminate\Foundation\Console\Kernel->handle() at /opt/librenms/app/Console/Kernel.php:66
App\Console\Kernel->handle() at /opt/librenms/lnms:38

from librenms.

laf avatar laf commented on June 4, 2024

Run validate, it should give you the sql commands to run (or allow you to auto fix the issue) to get your db back in a current state, then re-run the migration.

from librenms.

wriedel avatar wriedel commented on June 4, 2024

Hello Neil,

it's pretty much the same no matter what way I try I always end up with this:

MariaDB [libre_db]> alter table bill_data, drop primary key;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' drop primary key' at line 1

MariaDB [libre_db]> describe bill_data;
+-----------+------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+------------------+------+-----+---------+-------+
| bill_id | int(10) unsigned | NO | MUL | NULL | |
| timestamp | datetime | NO | | NULL | |
| period | int(11) | NO | | NULL | |
| delta | bigint(20) | NO | | NULL | |
| in_delta | bigint(20) | NO | | NULL | |
| out_delta | bigint(20) | NO | | NULL | |
+-----------+------------------+------+-----+---------+-------+
6 rows in set (0.001 sec)

MariaDB [libre_db]> SHOW INDEX FROM bill_data;;
+-----------+------------+-----------------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment | Ignored |
+-----------+------------+-----------------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+
| bill_data | 1 | bill_data_bill_id_index | 1 | bill_id | A | 10 | NULL | NULL | | BTREE | | | NO |
| bill_data | 1 | bill_data_bill_id_timestamp_index | 1 | bill_id | A | 10 | NULL | NULL | | BTREE | | | NO |
| bill_data | 1 | bill_data_bill_id_timestamp_index | 2 | timestamp | A | 6504796 | NULL | NULL | | BTREE | | | NO |
+-----------+------------+-----------------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+---------+
3 rows in set (0.000 sec)

ERROR: No query specified

Should I try the mysql dump, drop, import dance?

Thank you,
Wolfgang

#-----

sudo -u librenms /opt/librenms/daily.sh
Updating to latest codebase OK
Updating Composer packages OK
Updating SQL-Schema FAIL

INFO Running migrations.

2024_01_09_223917_bill_data_new_primary ................................................................................................. 9ms FAIL

In Connection.php line 822:

SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP INDEX PRIMARY; check that it exists (Connection: mysql, SQL: alter table bill_data drop primary key)

In Connection.php line 580:

SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP INDEX PRIMARY; check that it exists

Updating submodules OK
Cleaning up DB OK
Fetching notifications OK
Caching PeeringDB data OK
root@thor-odd:/home/wriedel# sudo -u librenms /opt/librenms/validate.php

Component Version
LibreNMS 24.1.0-48-ga7a6e67e8 (2024-01-24T09:15:40+01:00)
DB Schema 2023_12_10_130000_historical_data_to_ports_nac (278)
PHP 8.2.15
Python 3.11.2
Database MariaDB 10.11.4-MariaDB-1~deb12u1
RRDTool 1.7.2
SNMP 5.9.3
===========================================

[OK] Composer Version: 2.6.6
[OK] Dependencies up-to-date.
[OK] Database connection successful
[FAIL] Your database is out of date!
[FIX]:
./lnms migrate
Attempt to fix this issue (y or n)?:y

In Connection.php line 822:

SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP INDEX PRIMARY; check that it exists (Connection: mysql, SQL: alter table bill_data drop primary key)

In Connection.php line 580:

SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP INDEX PRIMARY; check that it exists

                                                                                                        MariaDB [libre_db]> select `migration` from `migrations` order by `batch` asc, `migration` asc;

+----------------------------------------------------------------------------+
| migration |
+----------------------------------------------------------------------------+
| 2018_07_03_091314_create_access_points_table |
| 2018_07_03_091314_create_alert_device_map_table |
| 2018_07_03_091314_create_alert_group_map_table |
| 2018_07_03_091314_create_alert_log_table |
| 2018_07_03_091314_create_alert_rules_table |
| 2018_07_03_091314_create_alert_schedulables_table |
| 2018_07_03_091314_create_alert_schedule_table |
| 2018_07_03_091314_create_alert_template_map_table |
| 2018_07_03_091314_create_alert_templates_table |
| 2018_07_03_091314_create_alert_transport_groups_table |
| 2018_07_03_091314_create_alert_transport_map_table |
| 2018_07_03_091314_create_alert_transports_table |
| 2018_07_03_091314_create_alerts_table |
| 2018_07_03_091314_create_api_tokens_table |
| 2018_07_03_091314_create_application_metrics_table |
| 2018_07_03_091314_create_applications_table |
| 2018_07_03_091314_create_authlog_table |
| 2018_07_03_091314_create_bgpPeers_cbgp_table |
| 2018_07_03_091314_create_bgpPeers_table |
| 2018_07_03_091314_create_bill_data_table |
| 2018_07_03_091314_create_bill_history_table |
| 2018_07_03_091314_create_bill_perms_table |
| 2018_07_03_091314_create_bill_port_counters_table |
| 2018_07_03_091314_create_bill_ports_table |
| 2018_07_03_091314_create_bills_table |
| 2018_07_03_091314_create_callback_table |
| 2018_07_03_091314_create_cef_switching_table |
| 2018_07_03_091314_create_ciscoASA_table |
| 2018_07_03_091314_create_component_prefs_table |
| 2018_07_03_091314_create_component_statuslog_table |
| 2018_07_03_091314_create_component_table |
| 2018_07_03_091314_create_config_table |
| 2018_07_03_091314_create_customers_table |
| 2018_07_03_091314_create_dashboards_table |
| 2018_07_03_091314_create_dbSchema_table |
| 2018_07_03_091314_create_device_graphs_table |
| 2018_07_03_091314_create_device_group_device_table |
| 2018_07_03_091314_create_device_groups_table |
| 2018_07_03_091314_create_device_mibs_table |
| 2018_07_03_091314_create_device_oids_table |
| 2018_07_03_091314_create_device_perf_table |
| 2018_07_03_091314_create_device_relationships_table |
| 2018_07_03_091314_create_devices_attribs_table |
| 2018_07_03_091314_create_devices_perms_table |
| 2018_07_03_091314_create_devices_table |
| 2018_07_03_091314_create_entityState_table |
| 2018_07_03_091314_create_entPhysical_state_table |
| 2018_07_03_091314_create_entPhysical_table |
| 2018_07_03_091314_create_eventlog_table |
| 2018_07_03_091314_create_graph_types_table |
| 2018_07_03_091314_create_hrDevice_table |
| 2018_07_03_091314_create_ipsec_tunnels_table |
| 2018_07_03_091314_create_ipv4_addresses_table |
| 2018_07_03_091314_create_ipv4_mac_table |
| 2018_07_03_091314_create_ipv4_networks_table |
| 2018_07_03_091314_create_ipv6_addresses_table |
| 2018_07_03_091314_create_ipv6_networks_table |
| 2018_07_03_091314_create_juniAtmVp_table |
| 2018_07_03_091314_create_links_table |
| 2018_07_03_091314_create_loadbalancer_rservers_table |
| 2018_07_03_091314_create_loadbalancer_vservers_table |
| 2018_07_03_091314_create_locations_table |
| 2018_07_03_091314_create_mac_accounting_table |
| 2018_07_03_091314_create_mefinfo_table |
| 2018_07_03_091314_create_mempools_table |
| 2018_07_03_091314_create_mibdefs_table |
| 2018_07_03_091314_create_munin_plugins_ds_table |
| 2018_07_03_091314_create_munin_plugins_table |
| 2018_07_03_091314_create_netscaler_vservers_table |
| 2018_07_03_091314_create_notifications_attribs_table |
| 2018_07_03_091314_create_notifications_table |
| 2018_07_03_091314_create_ospf_areas_table |
| 2018_07_03_091314_create_ospf_instances_table |
| 2018_07_03_091314_create_ospf_nbrs_table |
| 2018_07_03_091314_create_ospf_ports_table |
| 2018_07_03_091314_create_packages_table |
| 2018_07_03_091314_create_pdb_ix_peers_table |
| 2018_07_03_091314_create_pdb_ix_table |
| 2018_07_03_091314_create_perf_times_table |
| 2018_07_03_091314_create_plugins_table |
| 2018_07_03_091314_create_poller_cluster_stats_table |
| 2018_07_03_091314_create_poller_cluster_table |
| 2018_07_03_091314_create_poller_groups_table |
| 2018_07_03_091314_create_pollers_table |
| 2018_07_03_091314_create_ports_adsl_table |
| 2018_07_03_091314_create_ports_fdb_table |
| 2018_07_03_091314_create_ports_nac_table |
| 2018_07_03_091314_create_ports_perms_table |
| 2018_07_03_091314_create_ports_stack_table |
| 2018_07_03_091314_create_ports_statistics_table |
| 2018_07_03_091314_create_ports_stp_table |
| 2018_07_03_091314_create_ports_table |
| 2018_07_03_091314_create_ports_vlans_table |
| 2018_07_03_091314_create_processes_table |
| 2018_07_03_091314_create_processors_table |
| 2018_07_03_091314_create_proxmox_ports_table |
| 2018_07_03_091314_create_proxmox_table |
| 2018_07_03_091314_create_pseudowires_table |
| 2018_07_03_091314_create_route_table |
| 2018_07_03_091314_create_sensors_table |
| 2018_07_03_091314_create_sensors_to_state_indexes_table |
| 2018_07_03_091314_create_services_table |
| 2018_07_03_091314_create_session_table |
| 2018_07_03_091314_create_slas_table |
| 2018_07_03_091314_create_state_indexes_table |
| 2018_07_03_091314_create_state_translations_table |
| 2018_07_03_091314_create_storage_table |
| 2018_07_03_091314_create_stp_table |
| 2018_07_03_091314_create_syslog_table |
| 2018_07_03_091314_create_tnmsneinfo_table |
| 2018_07_03_091314_create_toner_table |
| 2018_07_03_091314_create_transport_group_transport_table |
| 2018_07_03_091314_create_ucd_diskio_table |
| 2018_07_03_091314_create_users_prefs_table |
| 2018_07_03_091314_create_users_table |
| 2018_07_03_091314_create_users_widgets_table |
| 2018_07_03_091314_create_vlans_table |
| 2018_07_03_091314_create_vminfo_table |
| 2018_07_03_091314_create_vrf_lite_cisco_table |
| 2018_07_03_091314_create_vrfs_table |
| 2018_07_03_091314_create_widgets_table |
| 2018_07_03_091314_create_wireless_sensors_table |
| 2018_07_03_091322_add_foreign_keys_to_component_prefs_table |
| 2018_07_03_091322_add_foreign_keys_to_component_statuslog_table |
| 2018_07_03_091322_add_foreign_keys_to_device_group_device_table |
| 2018_07_03_091322_add_foreign_keys_to_device_relationships_table |
| 2018_07_03_091322_add_foreign_keys_to_sensors_table |
| 2018_07_03_091322_add_foreign_keys_to_sensors_to_state_indexes_table |
| 2018_07_03_091322_add_foreign_keys_to_wireless_sensors_table |
| 2019_01_16_132200_add_vlan_and_elapsed_to_nac |
| 2019_01_16_195644_add_vrf_id_and_bgpLocalAs |
| 2019_02_10_220000_add_dates_to_fdb |
| 2019_05_12_202407_create_mpls_lsps_table |
| 2019_05_12_202408_create_mpls_lsp_paths_table |
| 2019_05_30_225937_device_groups_rewrite |
| 2019_06_30_190400_create_mpls_sdps_table |
| 2019_06_30_190401_create_mpls_sdp_binds_table |
| 2019_06_30_190402_create_mpls_services_table |
| 2019_07_03_132417_create_mpls_saps_table |
| 2019_07_09_150217_update_users_widgets_settings |
| 2019_09_05_153524_create_notifications_attribs_index |
| 2019_09_29_114433_change_default_mempool_perc_warn_in_mempools_table |
| 2019_02_05_140857_remove_config_definition_from_db |
| 2019_08_28_105051_fix-template-linefeeds |
| 2019_10_03_211702_serialize_config |
| 2019_04_22_220000_update_route_table |
| 2019_08_10_223200_add_enabled_to_users |
| 2019_12_16_140000_create_customoids_table |
| 2019_10_21_105350_devices_group_perms |
| 2019_11_30_191013_create_mpls_tunnel_ar_hops_table |
| 2019_11_30_191013_create_mpls_tunnel_c_hops_table |
| 2019_12_01_165514_add_indexes_to_mpls_lsp_paths_table |
| 2019_12_05_164700_alerts_disable_on_update_current_timestamp |
| 2019_12_17_151314_add_invert_map_to_alert_rules |
| 2020_01_09_1300_migrate_devices_attribs_table |
| 2019_12_28_180000_add_overwrite_ip_to_devices |
| 2020_02_05_093457_add_inserted_to_devices |
| 2020_02_05_224042_device_inserted_null |
| 2020_02_10_223323_create_alert_location_map_table |
| 2020_03_24_0844_add_primary_key_to_device_graphs |
| 2020_03_25_165300_add_column_to_ports |
| 2020_01_10_075852_alter_mpls_lsp_paths_table |
| 2020_04_13_150500_add_last_error_fields_to_bgp_peers |
| 2020_04_19_010532_eventlog_sensor_reference_cleanup |
| 2020_04_06_001048_the_great_index_rename |
| 2020_05_24_212054_poller_cluster_settings |
| 2020_04_08_172357_alert_schedule_utc |
| 2020_05_22_020303_alter_metric_column |
| 2020_05_30_162638_remove_mib_polling_tables |
| 2020_06_06_222222_create_device_outages_table |
| 2020_06_23_00522_alter_availability_perc_column |
| 2020_07_27_00522_alter_devices_snmp_algo_columns |
| 2020_07_29_143221_add_device_perf_index |
| 2020_08_28_212054_drop_uptime_column_outages |
| 2020_09_18_223431_create_cache_table |
| 2020_09_22_172321_add_alert_log_index |
| 2020_09_24_000500_create_cache_locks_table |
| 2020_10_03_1000_add_primary_key_bill_perms |
| 2020_10_03_1000_add_primary_key_bill_ports |
| 2020_10_03_1000_add_primary_key_devices_perms |
| 2020_10_03_1000_add_primary_key_entPhysical_state |
| 2020_10_03_1000_add_primary_key_ipv4_mac |
| 2020_10_03_1000_add_primary_key_juniAtmVp |
| 2020_10_03_1000_add_primary_key_loadbalancer_vservers |
| 2020_10_03_1000_add_primary_key_ports_perms |
| 2020_10_03_1000_add_primary_key_processes |
| 2020_10_03_1000_add_primary_key_transport_group_transport |
| 2020_10_12_095504_mempools_add_oids |
| 2020_10_21_124101_allow_nullable_ospf_columns |
| 2020_10_30_093601_add_tos_to_ospf_ports |
| 2020_11_02_164331_add_powerstate_enum_to_vminfo |
| 2020_09_18_230114_create_service_templates_device_group_table |
| 2020_09_18_230114_create_service_templates_device_table |
| 2020_09_18_230114_create_service_templates_table |
| 2020_09_18_230114_extend_services_table_for_service_templates_table |
| 2020_09_19_230114_add_foreign_keys_to_service_templates_device_group_table |
| 2020_09_19_230114_add_foreign_keys_to_service_templates_device_table |
| 2021_02_08_224355_fix_invalid_dates |
| 2021_02_09_084318_remove_perf_times |
| 2021_02_21_203415_location_add_fixed_coordinates_flag |
| 2021_03_11_003540_rename_toner_table |
| 2021_03_11_003713_rename_printer_columns |
| 2021_03_17_160729_service_templates_cleanup |
| 2021_03_26_014054_change_cache_to_mediumtext |
| 2020_12_14_091314_create_port_group_port_table |
| 2020_12_14_091314_create_port_groups_table |
| 2021_02_09_122930_migrate_to_utf8mb4 |
| 2021_04_08_151101_add_foreign_keys_to_port_group_port_table |
| 2021_06_11_084830_slas_add_rtt_field |
| 2021_25_01_0127_create_isis_adjacencies_table |
| 2020_06_24_155119_drop_ports_if_high_speed |
| 2021_06_07_123600_create_sessions_table |
| 2021_07_06_1845_alter_bill_history_max_min |
| 2021_08_04_102914_add_syslog_indexes |
| 2021_08_26_093522_config_value_to_medium_text |
| 2021_09_07_094310_create_push_subscriptions_table |
| 2021_09_26_164200_create_hrsystem_table |
| 2021_10_02_190310_add_device_outages_index |
| 2021_10_03_164200_update_hrsystem_table |
| 2021_25_01_0128_isis_adjacencies_add_admin_status |
| 2021_25_01_0129_isis_adjacencies_nullable |
| 2021_07_28_102443_plugins_add_version_and_settings |
| 2021_10_20_072929_disable_example_plugin |
| 2021_10_20_224207_increase_length_of_attrib_type_column |
| 2021_11_12_123037_change_cpwVcID_to_unsignedInteger |
| 2021_11_17_105321_device_add_display_field |
| 2021_11_29_160744_change_ports_text_fields_to_varchar |
| 2021_11_29_165046_improve_devices_search_index |
| 2021_11_29_165436_improve_ports_search_index |
| 2021_12_02_100709_remove_ports_stp_unique_index |
| 2021_12_02_101739_add_vlan_field_to_stp_table |
| 2021_12_02_101810_add_vlan_and_port_index_fields_to_ports_stp_table |
| 2021_12_02_110154_update_ports_stp_unique_index |
| 2021_12_02_113537_ports_stp_designated_cost_change_to_int |
| 2022_02_03_164059_increase_auth_id_length |
| 2022_04_08_085504_isis_adjacencies_table_add_index |
| 2022_02_21_073500_add_iface_field_to_bgp_peers |
| 2022_05_25_084506_add_widgets_column_to_users_widgets_table |
| 2022_05_25_084617_migrate_widget_ids |
| 2022_05_25_085715_remove_user_widgets_id |
| 2022_05_25_090027_drop_widgets_table |
| 2022_05_30_084932_update-app-status-length |
| 2022_07_03_1947_add_app_data |
| 2022_07_19_081224_plugins_unique_index |
| 2022_08_15_091314_create_ports_vdsl_table |
| 2022_09_03_091314_update_ports_adsl_table_with_defaults |
| 2022_08_15_084506_add_rrd_type_to_sensors_table |
| 2022_08_15_084507_add_rrd_type_to_wireless_sensors_table |
| 2023_03_14_130653_migrate_empty_user_funcs_to_null |
| 2023_04_12_174529_modify_ports_table |
| 2023_05_12_071412_devices_expand_timetaken_doubles |
| 2023_04_27_164904_update_slas_opstatus_tinyint |
| 2023_06_02_230406_create_vendor_oui_table |
| 2023_08_02_090027_drop_dbschema_table |
| 2023_08_02_120455_vendor_ouis_unique_index |
| 2023_06_18_195618_create_bouncer_tables |
| 2023_06_18_201914_migrate_level_to_roles |
| 2023_09_01_084057_application_new_defaults |
| 2023_08_30_105156_add_applications_soft_deleted |
| 2023_04_26_185850_change_vminfo_vmw_vm_guest_o_s_nullable |
| 2023_10_07_170735_increase_processes_cputime_length |
| 2023_10_07_231037_application_metrics_add_primary_key |
| 2023_10_12_183306_ports_statistics_table_unsigned_stats |
| 2023_10_12_184311_bgp_peers_cbgp_table_unsigned_stats |
| 2023_10_12_184652_bgp_peers_table_unsigned_stats |
| 2023_10_14_162039_restore_ports_delta_fields |
| 2023_10_14_162234_restore_bgp_peers_cbgp_delta_fields |
| 2023_10_20_075853_cisco_asa_add_default_limits |
| 2023_10_31_074547_ospf_areas_unsigned |
| 2023_10_31_074901_ospf_instances_unsigned |
| 2023_10_31_075239_ospf_nbrs_unsigned |
| 2023_10_31_080052_ospf_ports_unsigned |
| 2023_11_04_125846_packages_increase_name_column_length |
| 2023_11_21_172239_increase_vminfo.vmwvmguestos_column_length |
| 2023_12_15_105529_access_points_nummonbssid_integer |
| 2023_12_08_184652_mpls_addrtype_fix |
| 2023_12_12_171400_alert_rule_note |
| 2023_12_10_130000_historical_data_to_ports_nac |
+----------------------------------------------------------------------------+
278 rows in set (0.001 sec)

MariaDB [libre_db]> alter table bill_data, drop primary key;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' drop primary key' at line 1

describe bill_data;
+-----------+------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+------------------+------+-----+---------+-------+
| bill_id | int(10) unsigned | NO | MUL | NULL | |
| timestamp | datetime | NO | | NULL | |
| period | int(11) | NO | | NULL | |
| delta | bigint(20) | NO | | NULL | |
| in_delta | bigint(20) | NO | | NULL | |
| out_delta | bigint(20) | NO | | NULL | |
+-----------+------------------+------+-----+---------+-------+
6 rows in set (0.001 sec)

from librenms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.