Mercurial > hg > savane-forge
changeset 138:342772515b88
Migrate the old authorized_keys cols to one row in svmain_sshkey
author | Jonathan Gonzalez V <zeus@gnu.org> |
---|---|
date | Sat, 19 Sep 2009 13:58:32 -0400 |
parents | 96e385b43a67 |
children | 68c7c716d012 |
files | migrate_old_savane.sql |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/migrate_old_savane.sql +++ b/migrate_old_savane.sql @@ -70,6 +70,16 @@ FROM savane_old.user WHERE savane_old.user.user_id != 100; +-- Import the ssh into the new model, the python code should care about make +-- the proper migration after a login or with a python code +TRUNCATE svmain_sshkey; +INSERT INTO svmain_sshkey + (user_id, ssh_key) + SELECT user_id, authorized_keys + FROM savane_old.user + WHERE authorized_keys != '' + and savane_old.user.user_id != 100; + -- Import group configurations -- type_id -> id TRUNCATE svmain_groupconfiguration;