mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
move profile components to separated namespace
This commit is contained in:
parent
61010e0a42
commit
b12f5e8b8f
13 changed files with 332 additions and 214 deletions
21
src/profile/identity/database.rs
Normal file
21
src/profile/identity/database.rs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
use sqlite::{Error, Transaction};
|
||||
|
||||
pub struct Table {
|
||||
pub id: i64,
|
||||
//pub profile_id: i64,
|
||||
}
|
||||
|
||||
pub fn init(tx: &Transaction) -> Result<usize, Error> {
|
||||
tx.execute(
|
||||
"CREATE TABLE IF NOT EXISTS `profile_identity`
|
||||
(
|
||||
`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||
`profile_id` INTEGER NOT NULL,
|
||||
`time` INTEGER NOT NULL,
|
||||
`name` VARCHAR(255),
|
||||
`certificate` TEXT NOT NULL,
|
||||
`key` TEXT NOT NULL
|
||||
)",
|
||||
[],
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue