--- /dev/null
+[package]
+name = "entity"
+version = "0.1.0"
+edition = "2024"
+
+[dependencies]
+ui-rs = { path = "../ui-rs" }
+sea-orm = { version = "2.0.0-rc", features = [ "with-chrono", "with-uuid", "macros" ] }
+
--- /dev/null
+use sea_orm_migration::{prelude::*, schema::*};
+
+#[derive(DeriveMigrationName)]
+pub struct Migration;
+
+#[async_trait::async_trait]
+impl MigrationTrait for Migration {
+ async fn up(&self, manager: &SchemaManager) -> Result<(), DbErr> {
+ manager
+ .create_table(
+ Table::create()
+ .table("user_settings")
+ .if_not_exists()
+ .col(pk_auto("id"))
+ .col(string("host"))
+ .col(string("user"))
+ .col(string("profile"))
+ .to_owned(),
+ )
+ .await
+ }
+
+ async fn down(&self, manager: &SchemaManager) -> Result<(), DbErr> {
+ manager
+ .drop_table(Table::drop().table("user_settings").to_owned())
+ .await
+ }
+}