Is there any way to copy paste a View to another DB?

E Jhay shared this question 2 months ago
Answered

View

Comments (5)

photo
2

There is no copy/paste view UI feature, here is a workaround solution (use "update view..." menu item),

1) step1, click "Update View..." to generate code

/b4af117bd179c1071fc35f5e9301f8b4

2) Select the target connection and database

It is equivalent to recreating the view in the target database

/6abcaa24e6ee1f033da68a914343a44a

photo
1

Hi Qinghai, Thanks for the prompt response.This confirms that moving your whole database to another server/prod means you need to manually re-create the Views.

photo
1

This workaround is only applicable to a single view, and it is obviously not easy to use for the views of the entire database. We will add this feature to the to-do list and allow all views to be rebuilt when copying the database

photo
1

Tyvm. Would love to see that in future releases.

photo
1

Resolved in 5.2.5. the database read-only views are also rebuilt when the database is copied.