Then set the three variables Michele mentioned to false directly, it is not necessary to create any metadata, the following code snippet print the station name from a remote database (vpn address), the powerful thing is that the table station has several fields but I defined only once :)
db = DAL('postgres://web2py:web2py@10.8.0.26:5432/postgis', migrate=False, migrate_enabled=False, lazy_tables=True, pool_size=3 ) db.define_table('station', Field('name') ) print db(db.station).select() Paolo 2014/1/9 Tushar Tuteja <ttut...@gmail.com> > No, > I don't want to alter the 5 tables schema. > But I want to perform CRUD operations. > And it would be great if somehow I can restrict web2py from altering table > schemas all together as a J2EE application is running on the same the DB > and DB is a remote DB. > thanks, > Tushar Tuteja > > > On 9 January 2014 18:45, Paolo Valleri <paolo.vall...@gmail.com> wrote: > >> Mind that DAL should be instantiated with fake_migrate_all; >> run your app once, then you can set it to false. This operation will >> create several files (one for each defined table) in the app/databases/ >> directory >> >> moreover, do you need to alter the 5 tables you mentioned? >> >> Paolo >> >> >> On Thursday, January 9, 2014 12:59:18 PM UTC+1, Michele Comitini wrote: >> >>> Instantiate the DAL with fake_migrate=True, migrate=False,migrate_enable= >>> False >>> Define the tables with only the fields you are going to need in a model >>> file. >>> This is going to create the metadata needed by web2py without touching >>> your legacy database schema. >>> >>> >>> >>> >>> 2014/1/9 Tushar Tuteja <ttu...@gmail.com> >>> >>>> I have a J2EE application and a database which has 200 tables in it. >>>> I want to develop a new application using web2py, which would use only >>>> 5 tables. >>>> I want to know how should I go about it. As I am not clear about how I >>>> would use database without mapping all the 200 tables which is a huge task. >>>> and I don't want web2py to make any changes on the database tables and >>>> their schema. >>>> only crud operations on the records of the 5 tables. >>>> >>>> Thanks, >>>> Regards, >>>> Tushar Tuteja >>>> >>>> -- >>>> Resources: >>>> - http://web2py.com >>>> - http://web2py.com/book (Documentation) >>>> - http://github.com/web2py/web2py (Source code) >>>> - https://code.google.com/p/web2py/issues/list (Report Issues) >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "web2py-users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to web2py+un...@googlegroups.com. >>>> >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>> >>> -- >> Resources: >> - http://web2py.com >> - http://web2py.com/book (Documentation) >> - http://github.com/web2py/web2py (Source code) >> - https://code.google.com/p/web2py/issues/list (Report Issues) >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "web2py-users" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/web2py/BPabc0lulcw/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> web2py+unsubscr...@googlegroups.com. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > Tushar Tuteja > Undergraduate Student(Fourth Year) > Civil Engineering > IIT Delhi > +919953061943 > ttut...@gmail.com <ttut...@gmal.com> > ce1090...@civil.iitd.ernet.in > "The question isn't who is going to let me; its who is going to stop me!" > - Howard Roark > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/BPabc0lulcw/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.