I did as Anthony and Pierre suggested, first export to CSV, then remove all
files from database/ folder, load web2py one time to create the right table
names etc, then import data... but I ran into an error:
File "../web2py/gluon/packages/dal/pydal/objects.py", line 947, in
import_from_csv_file
for lineno, line in enumerate(reader):
Error: field larger than field limit (131072)
Basically, I am stuck...
On Wednesday, May 17, 2017 at 1:44:08 AM UTC+8, Anthony wrote:
>
> SQLite only supports changing table names and adding columns. You might
> consider exporting the tables to CSV, drop the tables and have web2py
> re-create them, and then import the CSV data (back up the database file
> before doing any of this).
>
> Anthony
>
> On Tuesday, May 16, 2017 at 12:48:18 PM UTC-4, lyn2py wrote:
>>
>> I think I found it with Anthony's lead.
>>
>> I opened the sqlite db with a 3rd party browser, and looked for it.
>>
>> I found on many of the tables:
>>
>> "site_id" INTEGER REFERENCES "abcde_sites" ("id") ON DELETE CASCADE
>>
>> abcde_sites is my old table name.
>> how do I change it to the new tablename with web2py?
>> I ask this because there may be other table names that I would like to
>> change, due to the code evolving
>>
>> Thank you!
>>
>>
>>
>>
>>
>> On Tuesday, May 16, 2017 at 9:06:22 PM UTC+8, Anthony wrote:
>>>
>>> On Monday, May 15, 2017 at 10:09:18 PM UTC-4, lyn2py wrote:
>>>>
>>>> I had a setup that was working. But it's broken after I changed the
>>>> name of a table. This was what I did:
>>>>
>>>>
>>>> 1. Shut down web2py
>>>> 2. Edit the model - table name + all references to the table name
>>>> 3. Edit the sqlite - table name
>>>>
>>>> You would also need to change all the foreign key constraints in other
>>> tables that reference the table.
>>>
>>> Anthony
>>>
>>
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.