Server upload works

This commit is contained in:
micialware committed 2026-06-01 15:36:53 +03:00
1 parent 8e18e82202
commit c0bd558233
10 files changed
+405 -13

No files matched your search

+15 -5
View File
@@ -16,6 +16,16 @@ pub fn create_db() {
}
fn create_tables(conn: &Connection) {
conn.execute(
"create table settings
(
id text primary key,
value text
);",
(),
)
.unwrap_or_else(|e| 0);
conn.execute(
"create table card_set
(
@@ -28,7 +38,7 @@ fn create_tables(conn: &Connection) {
);",
(),
)
.unwrap();
.unwrap_or_else(|e| 0);
conn.execute(
"create table word_group
(
@@ -38,7 +48,7 @@ fn create_tables(conn: &Connection) {
);",
(),
)
.unwrap();
.unwrap_or_else(|e| 0);
conn.execute(
"create table words
(
@@ -55,7 +65,7 @@ fn create_tables(conn: &Connection) {
);",
(),
)
.unwrap();
.unwrap_or_else(|e| 0);
conn.execute(
"create table card_stats
(
@@ -72,13 +82,13 @@ fn create_tables(conn: &Connection) {
);",
(),
)
.unwrap();
.unwrap_or_else(|e| 0);
conn.execute(
"insert into word_group (name)
values (\"Слова\");",
(),
)
.unwrap();
.unwrap_or_else(|e| 0);
}
pub fn add_word(word: &mut WordData, connection: &Connection) {