Get rid of migrate=False in define_table(). On Wed, Jul 10, 2013 at 9:01 AM, Prasad Muley <[email protected]> wrote: > Hello All, > I am newbie to web2py framework. I have created one database > connection string to 'Mysql' as > > prankester@Altocumulus: ~ master ⚡ > $ bash cmdweb2py.sh > [17:21:35] > web2py Web Framework > Created by Massimo Di Pierro, Copyright 2007-2013 > Version 2.6.0-development+timestamp.2013.07.03.01.52.44 > Database drivers available: SQLite(sqlite3), MySQL(pymysql), MySQL(MySQLdb), > PostgreSQL(pg8000), IMAP(imaplib) > WARNING:web2py:import IPython error; use default python shell > Python 2.7.3 (default, Apr 10 2013, 05:46:21) > [GCC 4.6.3] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > (InteractiveConsole) > >>>>db=DAL("mysql://root:root@localhost/test") >>>>#Creating a Table > >>>> db.define_table('User_info', > ... Field('username',unique=True), > ... Field('password',notnull=True), > ... format='%(name)s', > ... migrate=False) > <Table User_info (id,username,password)> > >>>> db.User_info.insert(username='facebook',password='twitter') > Traceback (most recent call last): > File "<console>", line 1, in <module> > File "/home/prankester/web2py-master/gluon/dal.py", line 8579, in insert > ret = self._db._adapter.insert(self, self._listify(fields)) > File "/home/prankester/web2py-master/gluon/dal.py", line 1209, in insert > raise e > ProgrammingError: (1146, "Table 'test.User_info' doesn't exist") > > I don't know what happened wrong > Please help me. > > And I also want to know difference between > > db=DAL(("mysql://root:root@localhost/test",migrate_enabled=True) > and db.define_table('person',Field('name'), migrate=True) > > -- > > --- > 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 [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > >
-- --- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

