wrewolf / ovz-web-panel

Automatically exported from code.google.com/p/ovz-web-panel
0 stars 0 forks source link

update error after migration to mysql #414

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Steps to reproduce:
1. migrate successfully
2. update ovz web panel
3. tabel user was removed and only admin user was created

Actual result: all users in user table are deleted, no login is possible

Expected result: -

Version of the product: 2.0 / 2.1

Server OS: debian squeeze 64 bit

Browser: ie/ff

Additional information:
...
Upgrading database...
(in /opt/ovz-web-panel)
==  CreateUsers: migrating ====================================================
-- create_table("users", {:force=>true})
   -> 0.0028s
-- add_index(:users, :login, {:unique=>true})
   -> 0.0078s
==  CreateUsers: migrated (0.0115s) ===========================================

==  DefaultAdmin: migrating ===================================================
==  DefaultAdmin: migrated (0.0167s) ==========================================

==  CreateHardwareServers: migrating ==========================================
-- create_table(:hardware_servers)
rake aborted!
An error has occurred, all later migrations canceled:

Mysql::Error: Table 'hardware_servers' already exists: CREATE TABLE 
`hardware_servers` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, 
`host` varchar(255), `auth_key` varchar(255), `description` varchar(255)) 
ENGINE=InnoDB

(See full trace by running task with --trace)
Syncing physical servers state...
...

Original issue reported on code.google.com by cod...@iscgr.de on 9 Mar 2012 at 8:04

GoogleCodeExporter commented 9 years ago
There is any db changes between 2.0 and 2.1, so I think that migration to MySQL 
was not performed correctly. Try to do it once again. According to log I see 
that you had hardware_servers table but had no users table before running 
upgrade procedure. This means that due to some reason not all needed tables 
present in MySQL database.

Original comment by sibprogrammer on 10 Mar 2012 at 1:50

GoogleCodeExporter commented 9 years ago
hi, i have update to 2.1 night build. after this i have create a mysql database 
with changing parameters. after this i have restore the sql dump into mysql 
database.

following database structure was in mysql:

http://code.google.com/p/ovz-web-panel/source/browse/trunk/db/schema.rb

table users exist already, but was overwrite with update to newest nightly 
build.
if you would, we can do it again and send you an report.

thanks

Original comment by cod...@iscgr.de on 10 Mar 2012 at 1:54

GoogleCodeExporter commented 9 years ago
ok, we have done it again and import sql data manuelly - than it works *fine* :)

Original comment by cod...@iscgr.de on 11 Mar 2012 at 11:12

GoogleCodeExporter commented 9 years ago

Original comment by sibprogrammer on 12 Mar 2012 at 2:26