Look forward to this. Massimo
On Mar 1, 6:06 pm, Alexandre Andrade <[email protected]> wrote: > I posted it in another topic. > My idea is facilitate to create models from database, not directly import > them. > > 1.Define a connection > *2. List all databases* > 3; choose a database > *3*. List all tables of database. > *4*. choose the *tables* to work > *5*. list all fields of choosen tables > *6*. auto-detect field relationships > *7*. manually define field relationships > *8*. check for necessary requirements for DAL and suggest solutions; the > user choose the most appropriate solution and apply. > (for me, solutions are only: create or rename the necessary field, > especially id, would be could if DAL could accept declare a existent > autoincrement field as id, while this real name is not. A possible solution > is Postgresql is create a view redeclaring the name the field = my_id as > id. ) > *9*. DAL, as almost every orm, have a limited subset of fieldtypes, for > compatibility for all databases. If a existent database have a non-standard > DAL's fieldtype, is necessary define a solution how treat the data. So is > necessary define a kind of conversion routine reading and writing for every > non-standart fieldtype. The wizard would sugest some options or let the user > define their own code. > *10*. Finally, everything checked, generates the db model, including > migrate=False. > > Think that phpmyadmin and phppgadmin are capable of make almost all > operations of the databases. > > Python have a PEP that defines > > This API has been defined to encourage similarity between the > Python modules that are used to access databases. By doing this, > we hope to achieve a consistency leading to more easily understood > modules, code that is generally more portable across databases, > and a broader reach of database connectivity from Python > > http://www.python.org/dev/peps/pep-0249/ > > I will try to make this work to one database (postgresql) and than adjust to > work with others databases. > > 2009/3/1 mdipierro <[email protected]> > > > > > > > Somebody teach me how to. This cannot be done within SQL. Is there a > > portable protocol for that? > > > On Mar 1, 2:44 pm, Jason Brower <[email protected]> wrote: > > > +1 It would be sooo cool to have a database importer. > > > J > > > > On Sun, 2009-03-01 at 13:18 -0700, Paul Eden wrote: > > > > +1 on that. That is one feature of django that I miss in web2py. > > > > > Alexandre, > > > > Obriagdo pela applicacao tambem! > > > > > Paul > > > > > On Sun, Mar 1, 2009 at 1:06 AM, Alexandre Miguel de Andrade Souza > > > > <[email protected]> wrote: > > > > > I think some way to import database models too, creating > > > > models from existing databases. > > > > something that really disgust me is create the models in > > > > web2py. > > > > So much times the database is ready, in production, and we > > > > need to create a web interface, and (re)create every field > > > > really sucks. > > -- > Atenciosamente > > -- > ========================= > Alexandre Andrade > Hipercenter.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

