If it helps, I tried to open the CSV file in a 3rd party reader and it 
comes up an error.

I tried to look at in using a text editor, and I suspect in might be 
because I have "text" type fields that hold data containing double quotes. 
For example, something that looks like this in the DB:
The correct way to do this is <input type="text"> or <input type="text" />

Appears in the CSV file as:
The correct way to do this is <input type=""text""> or <input type=""text"" 
/>

The double quotes seem to double up by themselves - not sure if this is the 
expected or correct behavior...

I also have rather huge chunks of data in those text fields (it varies), 
again not sure if this info helps.

If there is any clue on how to resolve this, kindly assist!

Thank you




On Thursday, May 18, 2017 at 7:46:58 PM UTC+8, lyn2py wrote:
>
> 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.

Reply via email to