Skip to content

sqlite: creating Model tables #66

@Jomy10

Description

@Jomy10

It would be nice if there would be a create_if_not_exists method on Model to automatically create a Model in the database.

I don't see any functionality that can do this right now.

Example

#[derive(Model)]
struct MyTable {
    #[ormlite(primary_key)]
    pub id: i64
    pub val: String
}

MyTable::create_if_not_exists(&mut conn);

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