njord-rs / njord

A versatile, feature-rich Rust ORM ⛵
https://njord.rs
BSD 3-Clause "New" or "Revised" License
409 stars 21 forks source link

add create table #144

Closed chaseWillden closed 1 month ago

chaseWillden commented 1 month ago

Adds the ability to create tables via code:

let result = sqlite::create::create_table(c, User::default()).build();
vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
njord ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 8, 2024 2:13pm
mjovanc commented 1 month ago

I think we should use this in our njord_cli binary project instead to handle the migrations and just use njord library to map to what exists in the db though. I was thinking this initially as well, but I'm not seeing this as an important feature. But I might be wrong here! Let me know what you think. I already started the project of the CLI but waited with it since I wanted to build the more essential parts first.

chaseWillden commented 1 month ago

I think we should use this in our njord_cli binary project instead to handle the migrations and just use njord library to map to what exists in the db though. I was thinking this initially as well, but I'm not seeing this as an important feature. But I might be wrong here! Let me know what you think. I already started the project of the CLI but waited with it since I wanted to build the more essential parts first.

The main reason why I was building this in was because I had to go into the select_into.db file and actually do the create table stuff. It was more of a convenience. As far as the cli, totally agree there. This was one feature we would always use in the Jetbrains Exposed ORM as we were building new apps. I'm honestly cool either way though.