I want to create a MySQL View in hook_schema()
for a module I am developing.
Does anyone know how to do that?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.
Sign up to join this communityI want to create a MySQL View in hook_schema()
for a module I am developing.
Does anyone know how to do that?
I already know how to resolve this issue.
In the .install file instead of trying to create a View in the hook_schema in hook_install you can just use de db_query and create the view. Don't forget in the hook_uninstall to drop the created View.
With my researches i found that is impossible to create a view directly in hook_schema like you do in a table, but if someone knows how to that please share.
Hope this help someone out there.
EDIT: Thanks for the correction kiamlaluno