Skip to content

Is it possible to manually rename the table? #11

@BeneCollyridam

Description

@BeneCollyridam

Hey,

I love this project, and I am very excited to try it out, however I ran into a problem, where the name of my table is different from the struct name (as it is namespaced).

Are you able to change the table name in any way for a struct derived with Table?
My code looks like this:

#[derive(Table, FromRow, Debug)]
struct Parent {
    id: i32,
    first_name: String,
    last_name: String,
}

In Diesel I believe they allow you to add #[table_name="people_parent"] to change the name of a table. Do you have a similar feature planned/does it exist?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions