Hi folks,
I'm trying to accomplish the following:
Grab the db schema
Grab any constraints*
Alter tables
Add/Drop tables
I'm currently using pyodbc backend for Django.
I would like to perform all these tasks within a view file.
I'm using the following in order to grab fields of tables starting with 'core_':
SELECT table_name,ordinal_position,column_name,data_type,
is_nullable,character_maximum_length FROM
information_schema.COLUMNS WHERE table_name LIKE 'core_%'
ORDER BY ordinal_position
*Fixed thanks to Madhivanan Link
Any ideas to get started?