Skip to content

import_from_csv_file fails if export_to_csv_file with ref id column with gaps #711

@mkostrikin

Description

@mkostrikin

Let say we have two tables, where one refs on other

db.define_table('first', Field('name'))
db.define_table('second',Field('first','reference first')

If first table populated with data, and sometimes DB rejects inserts bc of some constrains, but id will count up and on next insert gap appears.
export_to_csv_file will generate files with id, but import_from_csv_file ignores id column creating them automatically.

If necessary, I will create a test_app to reproduce the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions