[gom/wip/hadess/builder-debug: 1/2] gom: command-builder: Add debug to table and column creation
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gom/wip/hadess/builder-debug: 1/2] gom: command-builder: Add debug to table and column creation
- Date: Thu, 23 Jun 2022 08:50:57 +0000 (UTC)
commit 843ac7462c929d0da9352ac44f455a9799da9b0b
Author: Bastien Nocera <hadess hadess net>
Date: Thu Jun 23 10:49:15 2022 +0200
gom: command-builder: Add debug to table and column creation
gom/gom-command-builder.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/gom/gom-command-builder.c b/gom/gom-command-builder.c
index d4ee21f..5bc8a5e 100644
--- a/gom/gom-command-builder.c
+++ b/gom/gom-command-builder.c
@@ -459,6 +459,8 @@ gom_command_builder_build_create (GomCommandBuilder *builder,
/* Create the table if it doesn't already exist */
if (table_is_new_in_version(klass, version)) {
+ g_debug ("Creating table '%s' new in version %d (if it does not exist)", klass->table, version);
+
str = g_string_new("CREATE TABLE IF NOT EXISTS ");
add_table_name(str, klass);
g_string_append(str, "(");
@@ -493,6 +495,9 @@ gom_command_builder_build_create (GomCommandBuilder *builder,
if (pspecs[i] != primary_pspec &&
is_mapped(pspecs[i]) &&
is_new_in_version(pspecs[i], version)) {
+ g_debug ("Adding column '%s' to table '%s' new in version %d",
+ pspecs[i]->name, klass->table, version);
+
str = g_string_new("ALTER TABLE ");
add_table_name(str, klass);
g_string_append(str, " ADD COLUMN ");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]