DBDiagram developed in Free plan wiped away

Under Free plan, when I opened two DB designs in different tabs, I hit save on the diagram in the first tab and the design got automatically replaced with the design opened in the second tab! :sweat_smile:

Nearly 1 day’s worth of effort has just been wiped away. How can I retrieve the old design back? Any help here would be greatly appreciated.

Thanks!

@Khoa_Huynh @huy
I am certain this is not the experience DBDiagram wishes their customers to have.
A resolution at the earliest possible would be great.

Hi @qwertynik, I’m really sorry for what happened. I am working with our developers to investigate this problem. Will get back to you very soon!

1 Like

Thanks @Tuan_Nguyen for your response. I also tried hitting Ctrl+Z, but the schema which came up was a completely different one.
Not sure what happened. Looks like a bug!

Hey @qwertynik could you share the steps to reproduce this issue? I tried this on my site but couldn’t meet the annoying bug…

@Tuan_Nguyen
Since I wanted to simultaneously work on 2 different DB Diagram documents I had opened two tabs.

  • Opened the first diagram in 1 tab.
  • Visited the dbdiagram.io on another tab to open another diagram. Took this long route because I was not able to open the diagram by right clicking and opening the link on new tab.
  • After the tab was second tab was open, I hit save on the first tab. And the diagram from the second tab was shown on the first tab and the name also changed.

Note: This is from my memory. The above steps are mostly going to be inline with what happened actually. There might be some minor variation. However, I am certain that I did not accidentally copy paste the wrong design and changed the name :joy:

Thanks!

@Tuan_Nguyen

Did you manage to reproduce the issue? Any other way in which the design be retrieved?

Since the diagrams are public I have not posted the links here. However, I am assuming sharing the link directly with you would not have issues because you will choose to keep the design confidential

Thanks!

@Tuan_Nguyen
Currently the DB Diagram, which was lost, now has a design which I did not create. I had hit Ctrl+Z.
Fully knowing the link will be kept confidential I can post the link to the dbdiagram.io file as personal message (not sure how it is done though)

Thanks!

Hey mate, sorry I had a meeting. I understand that the newly created design is very important to you, but my best guess is that if it was not saved properly (in our case maybe due to some errors) then highly likely we cannot retrieve it.

Still, I’m trying to reproduce the error on my side to verify the problem. May I ask:

  • When you said you opened the diagrams in 2 tabs, do you open the same file (with same URL) or do you open different files?
  • When you hit save, did you meet any warning pop-up?

@Tuan_Nguyen
No problem I understand. I can see that you are doing your best on this.
I remember saving it many time during the day August 21st I was working upon it.

Answer for the questions:

  1. There were two different URLs, I distinctly remember both the diagrams to be open.
  2. No warnings were received when I hit the save.
    There is certainly something unusual about this. I hope it was some action of mine, which I am unaware of right now, that lead to this. But the chances for this are very low. This does not seem to be an error which would be too costly to ignore!

Now on the same DBDiagram, there is a completely new DB design which I never did. Not sure what;s happening here.
Here is the schema:

//// -- LEVEL 1
//// -- Tables and References

// Creating tables
Table users as U {
  id int [pk, increment] // auto-increment
  full_name varchar
  created_at timestamp
  country_code int
}

Table countries {
  code int [pk]
  name varchar
  continent_name varchar
 }

// Creating references
// You can also define relaionship separately
// > many-to-one; < one-to-many; - one-to-one
Ref: U.country_code > countries.code  
Ref: merchants.country_code > countries.code

//----------------------------------------------//

//// -- LEVEL 2
//// -- Adding column settings

Table order_items {
  order_id int [ref: > orders.id] // inline relationship (many-to-one)
  product_id int
  quantity int [default: 1] // default value
}

Ref: order_items.product_id > products.id

Table orders {
  id int [pk] // primary key
  user_id int [not null, unique]
  status varchar
  created_at varchar [note: 'When order created'] // add column note
}

//----------------------------------------------//

//// -- Level 3 
//// -- Enum, Indexes

// Enum for 'products' table below
Enum products_status {
  out_of_stock
  in_stock
  running_low [note: 'less than 20'] // add column note
}

// Indexes: You can define a single or multi-column index 
Table products {
  id int [pk]
  name varchar
  merchant_id int [not null]
  price int
  status products_status
  created_at datetime [default: `now()`]
  
  Indexes {
    (merchant_id, status) [name:'product_status']
    id [unique]
  }
}

Table merchants {
  id int
  country_code int
  merchant_name varchar
  
  "created at" varchar
  admin_id int [ref: > U.id]
  Indexes {
    (id, country_code) [pk]
  }
}

Table merchant_periods {
  id int [pk]
  merchant_id int
  country_code int
  start_date datetime
  end_date datetime
}

Ref: products.merchant_id > merchants.id // many-to-one
//composite foreign key
Ref: merchant_periods.(merchant_id, country_code) > merchants.(id, country_code)

Also I just happened to click on the Version History I see that there are a lot of saves. Can those be used to retrieve the design?

Hey! It seems that the design you saved is the template design of dbdiagram for new users. I’m not entirely sure why it was saved to your file. However, if what you said is true (you saved the file several time during the day), then that data is already stored in Version History. You can upgrade to use that feature to revert to the most recent design before the error happened. I think that is the best option for now. Could you give it a shot?

@Tuan_Nguyen
There is something unusual about this.
The free version so far has sufficed our needs. I am willing to upgrade to the PRO version to retrieve the lost design. Given that I was under the Free Plan when building the design, can you confirm if the older versions would be retrievable?
Or, only the dates are shown in the UI to show what is possible in the PRO plan?

@Tuan_Nguyen
Since this is one-time version revert would it be possible to trigger this on your end without a PRO subscription?

Hey, when you’re a free user and you save your design, we have already saved a snapshot of that design in our backend system, so whenever you upgrade, all of such data will be accessible immediately.

Regarding the solution, I think it’s best to subscribe to the PRO version and restore your lost design using Version history. Though the free version might suffice you, I believe the Premium features will be very helpful at some points. (People love the table grouping and header colors!)

We normally still tweak our back-end to solve technical problems for every user. However, when it comes to premium features, we would prefer not to touch the back-end to ensure fairness for all users, especially those that have paid to use that same feature either once or many times. I hope you’d understand this ^^

1 Like

@Tuan_Nguyen
Thanks for confirming. Ok, I understand. Will upgrade to PRO plan and attempt retrieving the design back.

1 Like

Lovely! Please keep me updated!

@Tuan_Nguyen
Upgraded. Entered the payment details. Post the payment it said contact dbdiagram@holistics.io for any queries.
I still do not see the pro features activated

@Tuan_Nguyen
Activated now. Version restored. Still unsure on how this happened though.
Can you share the steps to generate an invoice for the same?
PS: Finally, for a team which responsive to customers, I think that this bug should be root-caused and eliminated.

Thanks!

1 Like

Thanks @qwertynik! I am working with the team to permanently fix this :wink: Let me know if you need any help!

1 Like

@Tuan_Nguyen
Would be helpful if this thread can be updated. Or email to all users to notify about this upgrade.