Announcement

Collapse
No announcement yet.

DocumentFolder deleted by end-user.. need to be restored

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • DocumentFolder deleted by end-user.. need to be restored

    Hi there

    in production, i have a user that deleted by mistake a document folder (containing many sub-folders and then, documents).

    I need to restore this documentFolder.

    I run a SQL command to
    PHP Code:
    mysqlselect from document_folder where id '594b8ecbc13a6a06f';
    +-------------------+--------+---------+-------------+---------------------+---------------------+-------------------+-------------------+-------------------+
    id                name   deleted description created_at          modified_at         created_by_id     modified_by_id    parent_id         |
    +-------------------+--------+---------+-------------+---------------------+---------------------+-------------------+-------------------+-------------------+
    594b8ecbc13a6a06f BILANS |       NULL        2017-06-22 09:32:59 2017-08-07 11:50:39 58a6d4903825fe0f2 58a72f1daef1e7174 59674b8c43157a8c1 |
    +-------------------+--------+---------+-------------+---------------------+---------------------+-------------------+-------------------+-------------------+
    1 row in set (0.00 sec)

    mysqlupdate document_folder set deleted =0 where id '594b8ecbc13a6a06f';
    Query OK1 row affected (0.01 sec)
    Rows matched1  Changed1  Warnings
    Now i can see again my DocumentFolder and all the given sub-folders in the treeView.

    But... When i click on this "restored" folder, directly on the name, i cannot see any more all documents of all sub-folders like before.

    Could you help me and tell me if there is any other attributes that i should update?
    I would like to click on the folder name and see all sub-folders documents like before

    Thanks for your support

  • #2
    You'll need to re-add the folder relation and possibly subfolders in the table: document_folder_path.
    Last edited by joy11; 08-17-2017, 05:54 PM.

    Comment


    • #3
      Hello
      set in your document_folder table deleted=0 for your record

      Comment


      • #4
        Hi @tanya

        Already done as described in the upper post

        PHP Code:
        mysqlupdate document_folder set deleted =0 where id '594b8ecbc13a6a06f';
        Query OK1 row affected (0.01 sec)
        Rows matched1  Changed1  Warnings
        Now i can see again my DocumentFolder and all the given sub-folders in the treeView.

        But... When i click on this "restored" folder, directly on the name, i cannot see any more all documents of all sub-folders like before.

        Could you help me and tell me if there is any other attributes that i should update?
        I would like to click on the folder name and see all sub-folders documents like before


        Any tricks with tables document_folder_path ?

        I can see that i have no relations here now..

        PHP Code:
        mysqlSELECT FROM `document_folder_pathwhere ascendor_id '594b8ecbc13a6a06f';
        Empty 
        set (0.00 sec)

        mysqlSELECT FROM `document_folder_pathwhere descendor_id '594b8ecbc13a6a06f';
        Empty 
        set (0.00 sec
        Last edited by wtconseil; 08-17-2017, 05:24 PM.

        Comment


        • #5
          I find in a backup the deleted records and readd them ..

          all seems to be back.. up & running

          Thanks for your quick and first-class support <3 !

          PHP Code:
          INSERT INTO `document_folder_path` (`id`, `ascendor_id`, `descendor_id`) VALUES
          (27'594b8ecbc13a6a06f''594b8eddd421b8966'),
          (
          29'594b8ecbc13a6a06f''594b8ee329eb3dc62'),
          (
          31'594b8ecbc13a6a06f''594b8f165f202c193'),
          (
          34'594b8ecbc13a6a06f''594b8f1b36046cf65'),
          (
          1098'594b8ecbc13a6a06f''5963a65dbf86768a1'),
          (
          1100'594b8ecbc13a6a06f''5963a66ba53eb9067'),
          (
          1103'594b8ecbc13a6a06f''5963a69203c5f981b'),
          (
          1105'594b8ecbc13a6a06f''5963a6997a2a6bdde'),
          (
          1108'594b8ecbc13a6a06f''5963a6cbd3288b6e3'),
          (
          1111'594b8ecbc13a6a06f''5963a6d80547385f4'),
          (
          1114'594b8ecbc13a6a06f''59647d62b81b0937f'),
          (
          1116'594b8ecbc13a6a06f''59647d7d54e46bfe0'),
          (
          1118'594b8ecbc13a6a06f''59647d8c04f7b9498'),
          (
          1120'594b8ecbc13a6a06f''59647d99a0c25e5c1'),
          (
          1122'594b8ecbc13a6a06f''59647da741feaee32'),
          (
          1124'594b8ecbc13a6a06f''59647dcccbf0e29b8'),
          (
          1126'594b8ecbc13a6a06f''59647deacfd070371'),
          (
          1128'594b8ecbc13a6a06f''59647dfeba7de73b6'),
          (
          1130'594b8ecbc13a6a06f''59647e1f240973b10'),
          (
          1132'594b8ecbc13a6a06f''59647e3627ba66d06'),
          (
          1134'594b8ecbc13a6a06f''59647e40c66657aee'),
          (
          1136'594b8ecbc13a6a06f''59647e4c23f0be105'),
          (
          1138'594b8ecbc13a6a06f''59647e5ce4c4c1c89'),
          (
          1140'594b8ecbc13a6a06f''59647ec02c8b4f121'),
          (
          1143'594b8ecbc13a6a06f''59647ed4beb17b39f'),
          (
          1146'594b8ecbc13a6a06f''59647ee11b25f7aca'),
          (
          1149'594b8ecbc13a6a06f''59647eee4e95e94b8'),
          (
          1152'594b8ecbc13a6a06f''59647f0b04928f2a5'),
          (
          1155'594b8ecbc13a6a06f''59647f1e1d8679198'),
          (
          1158'594b8ecbc13a6a06f''59647f2ada41b2f9b'),
          (
          1161'594b8ecbc13a6a06f''59647f3c0a098b723'),
          (
          1164'594b8ecbc13a6a06f''59647f67912774994'),
          (
          1167'594b8ecbc13a6a06f''59647f748a11fd906'),
          (
          1170'594b8ecbc13a6a06f''59647f9a0f1e93e22'),
          (
          1173'594b8ecbc13a6a06f''59647fa8a00f4e98c'),
          (
          1176'594b8ecbc13a6a06f''59647fb8d55c6bbd5'),
          (
          1256'594b8ecbc13a6a06f''59649a5d86115c579'),
          (
          1258'594b8ecbc13a6a06f''59649aad93285fffc'),
          (
          1338'594b8ecbc13a6a06f''5964c965e38d6ec8b'),
          (
          1340'594b8ecbc13a6a06f''5964c9c925eba69e9'),
          (
          1343'594b8ecbc13a6a06f''59674b8c43157a8c1'); 

          Comment

          Working...
          X