Creating database views

Is it possible to have database views created through Cuba?

Every time I try and create one through [New Update Script] or even [Init Tables] they are not created and the update script disappears. There are certain database views that my program requires and I want them to be generated upon database creation.

I’m using Postgresql

Just wondering if it is possible?

I create views with INIT DATA and UPDATE frequently through studio. (including altering them later)

Although it is with SQL Server. I assume your create view script works in pgadmin?

Hi,

Yes, it is possible to create DB views through Cuba database scripts.
Both ‘New update script’ and adding to ‘INIT TABLES’ options are valid. But adding view creation script to INIT DATA is preferable, as all tables will be created at this step. In case of INIT TABLES you should place view creation statement after table creation.

Please check if there are any errors during database update or creation.
If update script execution failed, then it will be marked for deletion on the next Database Scripts page opening (There will be Warning window shown with unapplied scripts).

1 Like

Yeah the problem was errors in the existing scripts so fixed those and now it’s working perfectly.

Thanks for that.

1 Like