diff --git a/api/.sqlx/query-cb09ee423af9b2ed6b8c464c628fbe87df196aa9b9070d2efeecd7c42aa1d491.json b/api/.sqlx/query-01b5eceaaeaea94b7b47791f0312008829ecaf5b4d2182d6bdca9f360824e6e1.json similarity index 58% rename from api/.sqlx/query-cb09ee423af9b2ed6b8c464c628fbe87df196aa9b9070d2efeecd7c42aa1d491.json rename to api/.sqlx/query-01b5eceaaeaea94b7b47791f0312008829ecaf5b4d2182d6bdca9f360824e6e1.json index d23d281..1a2320c 100644 --- a/api/.sqlx/query-cb09ee423af9b2ed6b8c464c628fbe87df196aa9b9070d2efeecd7c42aa1d491.json +++ b/api/.sqlx/query-01b5eceaaeaea94b7b47791f0312008829ecaf5b4d2182d6bdca9f360824e6e1.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n insert into tenants (name)\n values ($1)\n returning id\n ", + "query": "\n insert into app.tenants (name)\n values ($1)\n returning id\n ", "describe": { "columns": [ { @@ -18,5 +18,5 @@ false ] }, - "hash": "cb09ee423af9b2ed6b8c464c628fbe87df196aa9b9070d2efeecd7c42aa1d491" + "hash": "01b5eceaaeaea94b7b47791f0312008829ecaf5b4d2182d6bdca9f360824e6e1" } diff --git a/api/.sqlx/query-a5d1e19722564b4c3fd86a8718f967962050c24ceee591c32f1df63579754a85.json b/api/.sqlx/query-0305973c5681711319314741afd129fde7b7ea31231720b861a4439f6aa4acb5.json similarity index 65% rename from api/.sqlx/query-a5d1e19722564b4c3fd86a8718f967962050c24ceee591c32f1df63579754a85.json rename to api/.sqlx/query-0305973c5681711319314741afd129fde7b7ea31231720b861a4439f6aa4acb5.json index 05b4ce6..8b0d98c 100644 --- a/api/.sqlx/query-a5d1e19722564b4c3fd86a8718f967962050c24ceee591c32f1df63579754a85.json +++ b/api/.sqlx/query-0305973c5681711319314741afd129fde7b7ea31231720b861a4439f6aa4acb5.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n select id, name, data\n from queue.task_queue\n order by id\n limit 1\n for update\n skip locked\n ", + "query": "\n select id, name, data\n from app.task_queue\n order by id\n limit 1\n for update\n skip locked\n ", "describe": { "columns": [ { @@ -28,5 +28,5 @@ false ] }, - "hash": "a5d1e19722564b4c3fd86a8718f967962050c24ceee591c32f1df63579754a85" + "hash": "0305973c5681711319314741afd129fde7b7ea31231720b861a4439f6aa4acb5" } diff --git a/api/.sqlx/query-858c52c6cd21a1e841348f462534b56483304b523d93bf3bcda08dfebbdfde9f.json b/api/.sqlx/query-046b6b7500c21d7236a146287f58e793388e5a22ba165e0018cfb513a12059dd.json similarity index 59% rename from api/.sqlx/query-858c52c6cd21a1e841348f462534b56483304b523d93bf3bcda08dfebbdfde9f.json rename to api/.sqlx/query-046b6b7500c21d7236a146287f58e793388e5a22ba165e0018cfb513a12059dd.json index 1220756..d0b94e3 100644 --- a/api/.sqlx/query-858c52c6cd21a1e841348f462534b56483304b523d93bf3bcda08dfebbdfde9f.json +++ b/api/.sqlx/query-046b6b7500c21d7236a146287f58e793388e5a22ba165e0018cfb513a12059dd.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n delete from tenants\n where id = $1\n returning id\n ", + "query": "\n delete from app.tenants\n where id = $1\n returning id\n ", "describe": { "columns": [ { @@ -18,5 +18,5 @@ false ] }, - "hash": "858c52c6cd21a1e841348f462534b56483304b523d93bf3bcda08dfebbdfde9f" + "hash": "046b6b7500c21d7236a146287f58e793388e5a22ba165e0018cfb513a12059dd" } diff --git a/api/.sqlx/query-652474006762bda394138e8dc881b8973e9bf9a549937d7a856d5e36c9a454d6.json b/api/.sqlx/query-0bd3a776b8c3a795eb4a7df13da9f7a10a9fa258c223a41c9008b80da60ade63.json similarity index 58% rename from api/.sqlx/query-652474006762bda394138e8dc881b8973e9bf9a549937d7a856d5e36c9a454d6.json rename to api/.sqlx/query-0bd3a776b8c3a795eb4a7df13da9f7a10a9fa258c223a41c9008b80da60ade63.json index 65a762a..c94f948 100644 --- a/api/.sqlx/query-652474006762bda394138e8dc881b8973e9bf9a549937d7a856d5e36c9a454d6.json +++ b/api/.sqlx/query-0bd3a776b8c3a795eb4a7df13da9f7a10a9fa258c223a41c9008b80da60ade63.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n update tenants\n set name = $1\n where id = $2\n returning id\n ", + "query": "\n update app.tenants\n set name = $1\n where id = $2\n returning id\n ", "describe": { "columns": [ { @@ -19,5 +19,5 @@ false ] }, - "hash": "652474006762bda394138e8dc881b8973e9bf9a549937d7a856d5e36c9a454d6" + "hash": "0bd3a776b8c3a795eb4a7df13da9f7a10a9fa258c223a41c9008b80da60ade63" } diff --git a/api/.sqlx/query-4a6e1e5b76eef28afa3f4747a5fc1a99faa1d69c2ceef82dad28764a0da49f8b.json b/api/.sqlx/query-0d96b66a879595ee2ad34b8ff531431737daaba7e0dd73641c1669a9fe8858f3.json similarity index 74% rename from api/.sqlx/query-4a6e1e5b76eef28afa3f4747a5fc1a99faa1d69c2ceef82dad28764a0da49f8b.json rename to api/.sqlx/query-0d96b66a879595ee2ad34b8ff531431737daaba7e0dd73641c1669a9fe8858f3.json index 5ffcc0d..1216bed 100644 --- a/api/.sqlx/query-4a6e1e5b76eef28afa3f4747a5fc1a99faa1d69c2ceef82dad28764a0da49f8b.json +++ b/api/.sqlx/query-0d96b66a879595ee2ad34b8ff531431737daaba7e0dd73641c1669a9fe8858f3.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n select i.id, i.name, i.is_default\n from images i\n join replicators r on i.id = r.image_id\n where r.id = $1\n ", + "query": "\n select i.id, i.name, i.is_default\n from app.images i\n join app.replicators r on i.id = r.image_id\n where r.id = $1\n ", "describe": { "columns": [ { @@ -30,5 +30,5 @@ false ] }, - "hash": "4a6e1e5b76eef28afa3f4747a5fc1a99faa1d69c2ceef82dad28764a0da49f8b" + "hash": "0d96b66a879595ee2ad34b8ff531431737daaba7e0dd73641c1669a9fe8858f3" } diff --git a/api/.sqlx/query-78d67ff45ac9a7bfa3f1754e90671020bd26a5f21a9a27b6eb580ea730a0e3dd.json b/api/.sqlx/query-18191e619e3ea3a347179af049f02dca73400184e933fc41f58ad8defad54bc8.json similarity index 83% rename from api/.sqlx/query-78d67ff45ac9a7bfa3f1754e90671020bd26a5f21a9a27b6eb580ea730a0e3dd.json rename to api/.sqlx/query-18191e619e3ea3a347179af049f02dca73400184e933fc41f58ad8defad54bc8.json index 80af8b2..1af8376 100644 --- a/api/.sqlx/query-78d67ff45ac9a7bfa3f1754e90671020bd26a5f21a9a27b6eb580ea730a0e3dd.json +++ b/api/.sqlx/query-18191e619e3ea3a347179af049f02dca73400184e933fc41f58ad8defad54bc8.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n select id, tenant_id, source_id, sink_id, replicator_id, publication_name, config\n from pipelines\n where tenant_id = $1 and id = $2\n ", + "query": "\n select id, tenant_id, source_id, sink_id, replicator_id, publication_name, config\n from app.pipelines\n where tenant_id = $1 and id = $2\n ", "describe": { "columns": [ { @@ -55,5 +55,5 @@ false ] }, - "hash": "78d67ff45ac9a7bfa3f1754e90671020bd26a5f21a9a27b6eb580ea730a0e3dd" + "hash": "18191e619e3ea3a347179af049f02dca73400184e933fc41f58ad8defad54bc8" } diff --git a/api/.sqlx/query-1dfea8fc82d14ba41c808bf112e02d2fa2d0ce0dc75c7c8f1de1aacca92f0d4f.json b/api/.sqlx/query-1dfea8fc82d14ba41c808bf112e02d2fa2d0ce0dc75c7c8f1de1aacca92f0d4f.json new file mode 100644 index 0000000..2933db9 --- /dev/null +++ b/api/.sqlx/query-1dfea8fc82d14ba41c808bf112e02d2fa2d0ce0dc75c7c8f1de1aacca92f0d4f.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n delete from app.task_queue\n where id = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "1dfea8fc82d14ba41c808bf112e02d2fa2d0ce0dc75c7c8f1de1aacca92f0d4f" +} diff --git a/api/.sqlx/query-4b168e1193a66ba55c1ee2a59e0249e261fa57101e8a782958054eda85947f51.json b/api/.sqlx/query-2a9043b2604069c6fa6811296d42717b40183cd308f913071c991affa16f9109.json similarity index 57% rename from api/.sqlx/query-4b168e1193a66ba55c1ee2a59e0249e261fa57101e8a782958054eda85947f51.json rename to api/.sqlx/query-2a9043b2604069c6fa6811296d42717b40183cd308f913071c991affa16f9109.json index 3500747..9b2acbc 100644 --- a/api/.sqlx/query-4b168e1193a66ba55c1ee2a59e0249e261fa57101e8a782958054eda85947f51.json +++ b/api/.sqlx/query-2a9043b2604069c6fa6811296d42717b40183cd308f913071c991affa16f9109.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n update sinks\n set config = $1\n where tenant_id = $2 and id = $3\n returning id\n ", + "query": "\n update app.sinks\n set config = $1\n where tenant_id = $2 and id = $3\n returning id\n ", "describe": { "columns": [ { @@ -20,5 +20,5 @@ false ] }, - "hash": "4b168e1193a66ba55c1ee2a59e0249e261fa57101e8a782958054eda85947f51" + "hash": "2a9043b2604069c6fa6811296d42717b40183cd308f913071c991affa16f9109" } diff --git a/api/.sqlx/query-f2343d04312638b3680e5f6b6749e98a4f11bcd7f4ac5a68d6e568e2d5420dc7.json b/api/.sqlx/query-344b7bac3092c85f7a337e6c120fa263b19141f3059f8f62b00bdb8f8a656fcb.json similarity index 58% rename from api/.sqlx/query-f2343d04312638b3680e5f6b6749e98a4f11bcd7f4ac5a68d6e568e2d5420dc7.json rename to api/.sqlx/query-344b7bac3092c85f7a337e6c120fa263b19141f3059f8f62b00bdb8f8a656fcb.json index bc606d6..dea7c03 100644 --- a/api/.sqlx/query-f2343d04312638b3680e5f6b6749e98a4f11bcd7f4ac5a68d6e568e2d5420dc7.json +++ b/api/.sqlx/query-344b7bac3092c85f7a337e6c120fa263b19141f3059f8f62b00bdb8f8a656fcb.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n update images\n set name = $1, is_default = $2\n where id = $3\n returning id\n ", + "query": "\n update app.images\n set name = $1, is_default = $2\n where id = $3\n returning id\n ", "describe": { "columns": [ { @@ -20,5 +20,5 @@ false ] }, - "hash": "f2343d04312638b3680e5f6b6749e98a4f11bcd7f4ac5a68d6e568e2d5420dc7" + "hash": "344b7bac3092c85f7a337e6c120fa263b19141f3059f8f62b00bdb8f8a656fcb" } diff --git a/api/.sqlx/query-c62257bbccb619e519dcdd3ca5a4c83fcb1aa837128f2f8c7bab3e67aaff16f8.json b/api/.sqlx/query-44c74dd07b704e7fe90745914976a792e07f1cd63e9307d7b111c0f85b4a2829.json similarity index 56% rename from api/.sqlx/query-c62257bbccb619e519dcdd3ca5a4c83fcb1aa837128f2f8c7bab3e67aaff16f8.json rename to api/.sqlx/query-44c74dd07b704e7fe90745914976a792e07f1cd63e9307d7b111c0f85b4a2829.json index 595e9c0..dbbbb10 100644 --- a/api/.sqlx/query-c62257bbccb619e519dcdd3ca5a4c83fcb1aa837128f2f8c7bab3e67aaff16f8.json +++ b/api/.sqlx/query-44c74dd07b704e7fe90745914976a792e07f1cd63e9307d7b111c0f85b4a2829.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n select exists (select id\n from sinks\n where tenant_id = $1 and id = $2) as \"exists!\"\n ", + "query": "\n select exists (select id\n from app.sources\n where tenant_id = $1 and id = $2) as \"exists!\"\n ", "describe": { "columns": [ { @@ -19,5 +19,5 @@ null ] }, - "hash": "c62257bbccb619e519dcdd3ca5a4c83fcb1aa837128f2f8c7bab3e67aaff16f8" + "hash": "44c74dd07b704e7fe90745914976a792e07f1cd63e9307d7b111c0f85b4a2829" } diff --git a/api/.sqlx/query-4b5b5148bf9c815c132416760b865afc6bb3b36445b097e1b4bf03e97d60eeca.json b/api/.sqlx/query-5172f7c874293a3ed68321ecd65f797d88f0ab90de6a54403147269732d9cb38.json similarity index 64% rename from api/.sqlx/query-4b5b5148bf9c815c132416760b865afc6bb3b36445b097e1b4bf03e97d60eeca.json rename to api/.sqlx/query-5172f7c874293a3ed68321ecd65f797d88f0ab90de6a54403147269732d9cb38.json index ddefbd2..b44a960 100644 --- a/api/.sqlx/query-4b5b5148bf9c815c132416760b865afc6bb3b36445b097e1b4bf03e97d60eeca.json +++ b/api/.sqlx/query-5172f7c874293a3ed68321ecd65f797d88f0ab90de6a54403147269732d9cb38.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n insert into replicators (tenant_id, image_id, status)\n values ($1, $2, $3::replicator_status)\n returning id\n ", + "query": "\n insert into app.replicators (tenant_id, image_id, status)\n values ($1, $2, $3::app.replicator_status)\n returning id\n ", "describe": { "columns": [ { @@ -15,7 +15,7 @@ "Int8", { "Custom": { - "name": "replicator_status", + "name": "app.replicator_status", "kind": { "Enum": [ "stopped", @@ -32,5 +32,5 @@ false ] }, - "hash": "4b5b5148bf9c815c132416760b865afc6bb3b36445b097e1b4bf03e97d60eeca" + "hash": "5172f7c874293a3ed68321ecd65f797d88f0ab90de6a54403147269732d9cb38" } diff --git a/api/.sqlx/query-1999b8c3eaa9bd7397498d53a9946032571ea39cfe071d88e215be6ca1f4bfe0.json b/api/.sqlx/query-51a192c02465ee1b3ef3ce40a730223a28deeaed1b6bb70a5df2e48d92d8e197.json similarity index 81% rename from api/.sqlx/query-1999b8c3eaa9bd7397498d53a9946032571ea39cfe071d88e215be6ca1f4bfe0.json rename to api/.sqlx/query-51a192c02465ee1b3ef3ce40a730223a28deeaed1b6bb70a5df2e48d92d8e197.json index 5802c29..9e0bd99 100644 --- a/api/.sqlx/query-1999b8c3eaa9bd7397498d53a9946032571ea39cfe071d88e215be6ca1f4bfe0.json +++ b/api/.sqlx/query-51a192c02465ee1b3ef3ce40a730223a28deeaed1b6bb70a5df2e48d92d8e197.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n select id, name, is_default\n from images\n where id = $1\n ", + "query": "\n select id, name, is_default\n from app.images\n where id = $1\n ", "describe": { "columns": [ { @@ -30,5 +30,5 @@ false ] }, - "hash": "1999b8c3eaa9bd7397498d53a9946032571ea39cfe071d88e215be6ca1f4bfe0" + "hash": "51a192c02465ee1b3ef3ce40a730223a28deeaed1b6bb70a5df2e48d92d8e197" } diff --git a/api/.sqlx/query-23dffad021b5de35604a54694df3347c8b45e47b0611f91fe02a07e8bcedb9d0.json b/api/.sqlx/query-5491e32f69e73ad62e54ac56228bdfbc4fc899103508a4a6e4eefc0f8aede791.json similarity index 83% rename from api/.sqlx/query-23dffad021b5de35604a54694df3347c8b45e47b0611f91fe02a07e8bcedb9d0.json rename to api/.sqlx/query-5491e32f69e73ad62e54ac56228bdfbc4fc899103508a4a6e4eefc0f8aede791.json index 5238a54..52fbade 100644 --- a/api/.sqlx/query-23dffad021b5de35604a54694df3347c8b45e47b0611f91fe02a07e8bcedb9d0.json +++ b/api/.sqlx/query-5491e32f69e73ad62e54ac56228bdfbc4fc899103508a4a6e4eefc0f8aede791.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n select id, name, is_default\n from images\n ", + "query": "\n select id, name, is_default\n from app.images\n ", "describe": { "columns": [ { @@ -28,5 +28,5 @@ false ] }, - "hash": "23dffad021b5de35604a54694df3347c8b45e47b0611f91fe02a07e8bcedb9d0" + "hash": "5491e32f69e73ad62e54ac56228bdfbc4fc899103508a4a6e4eefc0f8aede791" } diff --git a/api/.sqlx/query-8cd4296c8ac19d34ebbb8072df81288ca31aa524e64532384e002f024b8843f1.json b/api/.sqlx/query-563104cabe3edc2559d21a00f0329f18c1c8a138526908c404b774b76c58ad35.json similarity index 79% rename from api/.sqlx/query-8cd4296c8ac19d34ebbb8072df81288ca31aa524e64532384e002f024b8843f1.json rename to api/.sqlx/query-563104cabe3edc2559d21a00f0329f18c1c8a138526908c404b774b76c58ad35.json index 95e7175..f02943f 100644 --- a/api/.sqlx/query-8cd4296c8ac19d34ebbb8072df81288ca31aa524e64532384e002f024b8843f1.json +++ b/api/.sqlx/query-563104cabe3edc2559d21a00f0329f18c1c8a138526908c404b774b76c58ad35.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n select id, tenant_id, config\n from sinks\n where tenant_id = $1 and id = $2\n ", + "query": "\n select id, tenant_id, config\n from app.sources\n where tenant_id = $1 and id = $2\n ", "describe": { "columns": [ { @@ -31,5 +31,5 @@ false ] }, - "hash": "8cd4296c8ac19d34ebbb8072df81288ca31aa524e64532384e002f024b8843f1" + "hash": "563104cabe3edc2559d21a00f0329f18c1c8a138526908c404b774b76c58ad35" } diff --git a/api/.sqlx/query-3918489540d26371880ff919e3eacb8f26f1d2b387ebe34b6378b11deee7d33d.json b/api/.sqlx/query-60d06611d50de0a2daf09f9cba150b6684a62b0061c3173848a89e56ccdce774.json similarity index 55% rename from api/.sqlx/query-3918489540d26371880ff919e3eacb8f26f1d2b387ebe34b6378b11deee7d33d.json rename to api/.sqlx/query-60d06611d50de0a2daf09f9cba150b6684a62b0061c3173848a89e56ccdce774.json index 1434d6c..1fad712 100644 --- a/api/.sqlx/query-3918489540d26371880ff919e3eacb8f26f1d2b387ebe34b6378b11deee7d33d.json +++ b/api/.sqlx/query-60d06611d50de0a2daf09f9cba150b6684a62b0061c3173848a89e56ccdce774.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n update pipelines\n set source_id = $1, sink_id = $2, publication_name = $3, config = $4\n where tenant_id = $5 and id = $6\n returning id\n ", + "query": "\n update app.pipelines\n set source_id = $1, sink_id = $2, publication_name = $3, config = $4\n where tenant_id = $5 and id = $6\n returning id\n ", "describe": { "columns": [ { @@ -23,5 +23,5 @@ false ] }, - "hash": "3918489540d26371880ff919e3eacb8f26f1d2b387ebe34b6378b11deee7d33d" + "hash": "60d06611d50de0a2daf09f9cba150b6684a62b0061c3173848a89e56ccdce774" } diff --git a/api/.sqlx/query-b0909a3edbd0c3b166930877d18541b3d8cea96ac36be09953ce7e1370c4449e.json b/api/.sqlx/query-60e589f066566a3c6b5d1dc1ec97dd38746505c89b0915099aefd956163dc763.json similarity index 57% rename from api/.sqlx/query-b0909a3edbd0c3b166930877d18541b3d8cea96ac36be09953ce7e1370c4449e.json rename to api/.sqlx/query-60e589f066566a3c6b5d1dc1ec97dd38746505c89b0915099aefd956163dc763.json index 29e6953..0121475 100644 --- a/api/.sqlx/query-b0909a3edbd0c3b166930877d18541b3d8cea96ac36be09953ce7e1370c4449e.json +++ b/api/.sqlx/query-60e589f066566a3c6b5d1dc1ec97dd38746505c89b0915099aefd956163dc763.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n update sources\n set config = $1\n where tenant_id = $2 and id = $3\n returning id\n ", + "query": "\n update app.sources\n set config = $1\n where tenant_id = $2 and id = $3\n returning id\n ", "describe": { "columns": [ { @@ -20,5 +20,5 @@ false ] }, - "hash": "b0909a3edbd0c3b166930877d18541b3d8cea96ac36be09953ce7e1370c4449e" + "hash": "60e589f066566a3c6b5d1dc1ec97dd38746505c89b0915099aefd956163dc763" } diff --git a/api/.sqlx/query-b632dad4961fb26378de718d532cd25bd2082681cd2f2f753bcbe3738a6d9b10.json b/api/.sqlx/query-75da20a892b377e62bb27a051e5712f129df1d466ac49a63eb2898912f05bccb.json similarity index 79% rename from api/.sqlx/query-b632dad4961fb26378de718d532cd25bd2082681cd2f2f753bcbe3738a6d9b10.json rename to api/.sqlx/query-75da20a892b377e62bb27a051e5712f129df1d466ac49a63eb2898912f05bccb.json index d3788fe..4759a09 100644 --- a/api/.sqlx/query-b632dad4961fb26378de718d532cd25bd2082681cd2f2f753bcbe3738a6d9b10.json +++ b/api/.sqlx/query-75da20a892b377e62bb27a051e5712f129df1d466ac49a63eb2898912f05bccb.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n select id, name, is_default\n from images\n where is_default = true\n ", + "query": "\n select id, name, is_default\n from app.images\n where is_default = true\n ", "describe": { "columns": [ { @@ -28,5 +28,5 @@ false ] }, - "hash": "b632dad4961fb26378de718d532cd25bd2082681cd2f2f753bcbe3738a6d9b10" + "hash": "75da20a892b377e62bb27a051e5712f129df1d466ac49a63eb2898912f05bccb" } diff --git a/api/.sqlx/query-8c7658fe0f907f30e279df0a9ef5d260382d706f3659628d76f573139380fee1.json b/api/.sqlx/query-77a1de78ec6fc1f6382e7594ede907470ac3808a5aeb7e458fab380fe78d823e.json similarity index 58% rename from api/.sqlx/query-8c7658fe0f907f30e279df0a9ef5d260382d706f3659628d76f573139380fee1.json rename to api/.sqlx/query-77a1de78ec6fc1f6382e7594ede907470ac3808a5aeb7e458fab380fe78d823e.json index 9d0dd30..689b01a 100644 --- a/api/.sqlx/query-8c7658fe0f907f30e279df0a9ef5d260382d706f3659628d76f573139380fee1.json +++ b/api/.sqlx/query-77a1de78ec6fc1f6382e7594ede907470ac3808a5aeb7e458fab380fe78d823e.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n insert into images (name, is_default)\n values ($1, $2)\n returning id\n ", + "query": "\n insert into app.images (name, is_default)\n values ($1, $2)\n returning id\n ", "describe": { "columns": [ { @@ -19,5 +19,5 @@ false ] }, - "hash": "8c7658fe0f907f30e279df0a9ef5d260382d706f3659628d76f573139380fee1" + "hash": "77a1de78ec6fc1f6382e7594ede907470ac3808a5aeb7e458fab380fe78d823e" } diff --git a/api/.sqlx/query-89af468a16ee195a559a754c306cf27b29af50495b8026f42bea7891d3d1786e.json b/api/.sqlx/query-808c0febda267eabf1ac487a5d8e9b6b8e67e7582dd9d3c4d23c409258506645.json similarity index 59% rename from api/.sqlx/query-89af468a16ee195a559a754c306cf27b29af50495b8026f42bea7891d3d1786e.json rename to api/.sqlx/query-808c0febda267eabf1ac487a5d8e9b6b8e67e7582dd9d3c4d23c409258506645.json index 5dbd369..e7d0d29 100644 --- a/api/.sqlx/query-89af468a16ee195a559a754c306cf27b29af50495b8026f42bea7891d3d1786e.json +++ b/api/.sqlx/query-808c0febda267eabf1ac487a5d8e9b6b8e67e7582dd9d3c4d23c409258506645.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n delete from images\n where id = $1\n returning id\n ", + "query": "\n delete from app.images\n where id = $1\n returning id\n ", "describe": { "columns": [ { @@ -18,5 +18,5 @@ false ] }, - "hash": "89af468a16ee195a559a754c306cf27b29af50495b8026f42bea7891d3d1786e" + "hash": "808c0febda267eabf1ac487a5d8e9b6b8e67e7582dd9d3c4d23c409258506645" } diff --git a/api/.sqlx/query-9d7720208eb837295e10fda243c9e34b7c647549018bffff405deed86ee98457.json b/api/.sqlx/query-9479e2ec325439109cfed9511efe532f2526a42d2005d8da599a3cd70afa0b7b.json similarity index 79% rename from api/.sqlx/query-9d7720208eb837295e10fda243c9e34b7c647549018bffff405deed86ee98457.json rename to api/.sqlx/query-9479e2ec325439109cfed9511efe532f2526a42d2005d8da599a3cd70afa0b7b.json index cd37c22..62270e0 100644 --- a/api/.sqlx/query-9d7720208eb837295e10fda243c9e34b7c647549018bffff405deed86ee98457.json +++ b/api/.sqlx/query-9479e2ec325439109cfed9511efe532f2526a42d2005d8da599a3cd70afa0b7b.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n select id, tenant_id, config\n from sources\n where tenant_id = $1 and id = $2\n ", + "query": "\n select id, tenant_id, config\n from app.sinks\n where tenant_id = $1 and id = $2\n ", "describe": { "columns": [ { @@ -31,5 +31,5 @@ false ] }, - "hash": "9d7720208eb837295e10fda243c9e34b7c647549018bffff405deed86ee98457" + "hash": "9479e2ec325439109cfed9511efe532f2526a42d2005d8da599a3cd70afa0b7b" } diff --git a/api/.sqlx/query-f2b84d9c08d33b14cf8b472c74b583ce1f9d5f897be5e164c5f96203a414276e.json b/api/.sqlx/query-ac38d5574efe5b49827ed86b7efd467ff29a7012648ab7d1610db90dd3ee31f2.json similarity index 58% rename from api/.sqlx/query-f2b84d9c08d33b14cf8b472c74b583ce1f9d5f897be5e164c5f96203a414276e.json rename to api/.sqlx/query-ac38d5574efe5b49827ed86b7efd467ff29a7012648ab7d1610db90dd3ee31f2.json index 95cc798..2bb5dc2 100644 --- a/api/.sqlx/query-f2b84d9c08d33b14cf8b472c74b583ce1f9d5f897be5e164c5f96203a414276e.json +++ b/api/.sqlx/query-ac38d5574efe5b49827ed86b7efd467ff29a7012648ab7d1610db90dd3ee31f2.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n insert into sinks (tenant_id, config)\n values ($1, $2)\n returning id\n ", + "query": "\n insert into app.sinks (tenant_id, config)\n values ($1, $2)\n returning id\n ", "describe": { "columns": [ { @@ -19,5 +19,5 @@ false ] }, - "hash": "f2b84d9c08d33b14cf8b472c74b583ce1f9d5f897be5e164c5f96203a414276e" + "hash": "ac38d5574efe5b49827ed86b7efd467ff29a7012648ab7d1610db90dd3ee31f2" } diff --git a/api/.sqlx/query-ac554d0b053fafca39438e1fb70875e756876f0a7a8eb64979f76a369edb25a2.json b/api/.sqlx/query-ac554d0b053fafca39438e1fb70875e756876f0a7a8eb64979f76a369edb25a2.json deleted file mode 100644 index 04ce8aa..0000000 --- a/api/.sqlx/query-ac554d0b053fafca39438e1fb70875e756876f0a7a8eb64979f76a369edb25a2.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n delete from queue.task_queue\n where id = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "ac554d0b053fafca39438e1fb70875e756876f0a7a8eb64979f76a369edb25a2" -} diff --git a/api/.sqlx/query-095192dd8601e2a41d6a1dedb2b33f4f6f851cc8fa93259f58140ead8a4e3880.json b/api/.sqlx/query-ac92852f0dedb9b37510cbf271ac071f22b10a6d7de28e45543d66d79463340e.json similarity index 80% rename from api/.sqlx/query-095192dd8601e2a41d6a1dedb2b33f4f6f851cc8fa93259f58140ead8a4e3880.json rename to api/.sqlx/query-ac92852f0dedb9b37510cbf271ac071f22b10a6d7de28e45543d66d79463340e.json index 6e81e1c..31ecf8b 100644 --- a/api/.sqlx/query-095192dd8601e2a41d6a1dedb2b33f4f6f851cc8fa93259f58140ead8a4e3880.json +++ b/api/.sqlx/query-ac92852f0dedb9b37510cbf271ac071f22b10a6d7de28e45543d66d79463340e.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n select id, tenant_id, config\n from sources\n where tenant_id = $1\n ", + "query": "\n select id, tenant_id, config\n from app.sources\n where tenant_id = $1\n ", "describe": { "columns": [ { @@ -30,5 +30,5 @@ false ] }, - "hash": "095192dd8601e2a41d6a1dedb2b33f4f6f851cc8fa93259f58140ead8a4e3880" + "hash": "ac92852f0dedb9b37510cbf271ac071f22b10a6d7de28e45543d66d79463340e" } diff --git a/api/.sqlx/query-ffe7b58fb3d5071d40e566e6eea7bd61d5e8ee7dba152f7852fd4edafe788382.json b/api/.sqlx/query-ad02b73edec5b9ee54244aa340d450d20cac7447e473629abf5cac0ab0266978.json similarity index 58% rename from api/.sqlx/query-ffe7b58fb3d5071d40e566e6eea7bd61d5e8ee7dba152f7852fd4edafe788382.json rename to api/.sqlx/query-ad02b73edec5b9ee54244aa340d450d20cac7447e473629abf5cac0ab0266978.json index b9ca049..ad85975 100644 --- a/api/.sqlx/query-ffe7b58fb3d5071d40e566e6eea7bd61d5e8ee7dba152f7852fd4edafe788382.json +++ b/api/.sqlx/query-ad02b73edec5b9ee54244aa340d450d20cac7447e473629abf5cac0ab0266978.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n delete from sinks\n where tenant_id = $1 and id = $2\n returning id\n ", + "query": "\n delete from app.pipelines\n where tenant_id = $1 and id = $2\n returning id\n ", "describe": { "columns": [ { @@ -19,5 +19,5 @@ false ] }, - "hash": "ffe7b58fb3d5071d40e566e6eea7bd61d5e8ee7dba152f7852fd4edafe788382" + "hash": "ad02b73edec5b9ee54244aa340d450d20cac7447e473629abf5cac0ab0266978" } diff --git a/api/.sqlx/query-776ca3c2a132b52a53eb255e1b2c7d6c5dc29412b361c4295afe09399b31a3fd.json b/api/.sqlx/query-b0bfaa2bcc39a52a856346d127af7304f5b0b36cc4463595251be7467f251a45.json similarity index 70% rename from api/.sqlx/query-776ca3c2a132b52a53eb255e1b2c7d6c5dc29412b361c4295afe09399b31a3fd.json rename to api/.sqlx/query-b0bfaa2bcc39a52a856346d127af7304f5b0b36cc4463595251be7467f251a45.json index 7b2da11..3955208 100644 --- a/api/.sqlx/query-776ca3c2a132b52a53eb255e1b2c7d6c5dc29412b361c4295afe09399b31a3fd.json +++ b/api/.sqlx/query-b0bfaa2bcc39a52a856346d127af7304f5b0b36cc4463595251be7467f251a45.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n delete from pipelines\n where tenant_id = $1 and id = $2\n returning id\n ", + "query": "\n delete from app.sinks\n where tenant_id = $1 and id = $2\n returning id\n ", "describe": { "columns": [ { @@ -19,5 +19,5 @@ false ] }, - "hash": "776ca3c2a132b52a53eb255e1b2c7d6c5dc29412b361c4295afe09399b31a3fd" + "hash": "b0bfaa2bcc39a52a856346d127af7304f5b0b36cc4463595251be7467f251a45" } diff --git a/api/.sqlx/query-07b38e4f2a4600123f544d9f42d568c763a39eb438806977595e8e4c50062b8c.json b/api/.sqlx/query-b235f8fb03837d21191916b974fe2166db455218f1e1308d3a74b1bc41cd8008.json similarity index 58% rename from api/.sqlx/query-07b38e4f2a4600123f544d9f42d568c763a39eb438806977595e8e4c50062b8c.json rename to api/.sqlx/query-b235f8fb03837d21191916b974fe2166db455218f1e1308d3a74b1bc41cd8008.json index 31dbf9d..45c3693 100644 --- a/api/.sqlx/query-07b38e4f2a4600123f544d9f42d568c763a39eb438806977595e8e4c50062b8c.json +++ b/api/.sqlx/query-b235f8fb03837d21191916b974fe2166db455218f1e1308d3a74b1bc41cd8008.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n delete from sources\n where tenant_id = $1 and id = $2\n returning id\n ", + "query": "\n delete from app.sources\n where tenant_id = $1 and id = $2\n returning id\n ", "describe": { "columns": [ { @@ -19,5 +19,5 @@ false ] }, - "hash": "07b38e4f2a4600123f544d9f42d568c763a39eb438806977595e8e4c50062b8c" + "hash": "b235f8fb03837d21191916b974fe2166db455218f1e1308d3a74b1bc41cd8008" } diff --git a/api/.sqlx/query-2383af5276db040f9dcd48b840b88336215eee174bf230e22df3057b5bb9f84c.json b/api/.sqlx/query-b9005f5bc58b1ebb8d6555558b931e22f4c57b984e5cc5a46b3b7b18c791a48d.json similarity index 73% rename from api/.sqlx/query-2383af5276db040f9dcd48b840b88336215eee174bf230e22df3057b5bb9f84c.json rename to api/.sqlx/query-b9005f5bc58b1ebb8d6555558b931e22f4c57b984e5cc5a46b3b7b18c791a48d.json index 8d02756..40b4e79 100644 --- a/api/.sqlx/query-2383af5276db040f9dcd48b840b88336215eee174bf230e22df3057b5bb9f84c.json +++ b/api/.sqlx/query-b9005f5bc58b1ebb8d6555558b931e22f4c57b984e5cc5a46b3b7b18c791a48d.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n select r.id, r.tenant_id, r.image_id, r.status as \"status: ReplicatorStatus\"\n from replicators r\n join pipelines p on r.id = p.replicator_id\n where r.tenant_id = $1 and p.tenant_id = $1 and p.id = $2\n ", + "query": "\n select r.id, r.tenant_id, r.image_id, r.status as \"status: ReplicatorStatus\"\n from app.replicators r\n join app.pipelines p on r.id = p.replicator_id\n where r.tenant_id = $1 and p.tenant_id = $1 and p.id = $2\n ", "describe": { "columns": [ { @@ -23,7 +23,7 @@ "name": "status: ReplicatorStatus", "type_info": { "Custom": { - "name": "replicator_status", + "name": "app.replicator_status", "kind": { "Enum": [ "stopped", @@ -49,5 +49,5 @@ false ] }, - "hash": "2383af5276db040f9dcd48b840b88336215eee174bf230e22df3057b5bb9f84c" + "hash": "b9005f5bc58b1ebb8d6555558b931e22f4c57b984e5cc5a46b3b7b18c791a48d" } diff --git a/api/.sqlx/query-51d2698e5b892e2902310b512037efed4b70406198cd20c3464764d80a3b0344.json b/api/.sqlx/query-c12b3f5b0c165b08628eb2c4c9eb08c56afa0513f24eb147c431ce229b1efc24.json similarity index 69% rename from api/.sqlx/query-51d2698e5b892e2902310b512037efed4b70406198cd20c3464764d80a3b0344.json rename to api/.sqlx/query-c12b3f5b0c165b08628eb2c4c9eb08c56afa0513f24eb147c431ce229b1efc24.json index a2855cc..baaa722 100644 --- a/api/.sqlx/query-51d2698e5b892e2902310b512037efed4b70406198cd20c3464764d80a3b0344.json +++ b/api/.sqlx/query-c12b3f5b0c165b08628eb2c4c9eb08c56afa0513f24eb147c431ce229b1efc24.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n select id, name\n from tenants\n ", + "query": "\n select id, name\n from app.tenants\n ", "describe": { "columns": [ { @@ -22,5 +22,5 @@ false ] }, - "hash": "51d2698e5b892e2902310b512037efed4b70406198cd20c3464764d80a3b0344" + "hash": "c12b3f5b0c165b08628eb2c4c9eb08c56afa0513f24eb147c431ce229b1efc24" } diff --git a/api/.sqlx/query-6936d9fd44bca05eb6c09b4ce9141b944268727c84ae8a02cfc7c15fdf49a5d3.json b/api/.sqlx/query-cbdf32ce58c4b0eb5f01c7d92c9a490d42c7c8eb34709f9d405fe76d574fcdf3.json similarity index 84% rename from api/.sqlx/query-6936d9fd44bca05eb6c09b4ce9141b944268727c84ae8a02cfc7c15fdf49a5d3.json rename to api/.sqlx/query-cbdf32ce58c4b0eb5f01c7d92c9a490d42c7c8eb34709f9d405fe76d574fcdf3.json index 8f1dcd5..49493a6 100644 --- a/api/.sqlx/query-6936d9fd44bca05eb6c09b4ce9141b944268727c84ae8a02cfc7c15fdf49a5d3.json +++ b/api/.sqlx/query-cbdf32ce58c4b0eb5f01c7d92c9a490d42c7c8eb34709f9d405fe76d574fcdf3.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n select id, tenant_id, source_id, sink_id, replicator_id, publication_name, config\n from pipelines\n where tenant_id = $1\n ", + "query": "\n select id, tenant_id, source_id, sink_id, replicator_id, publication_name, config\n from app.pipelines\n where tenant_id = $1\n ", "describe": { "columns": [ { @@ -54,5 +54,5 @@ false ] }, - "hash": "6936d9fd44bca05eb6c09b4ce9141b944268727c84ae8a02cfc7c15fdf49a5d3" + "hash": "cbdf32ce58c4b0eb5f01c7d92c9a490d42c7c8eb34709f9d405fe76d574fcdf3" } diff --git a/api/.sqlx/query-07ff2b716f9e8728aa86995a5468a6da45fe5e8b91a3bf41bf477f91ea200173.json b/api/.sqlx/query-dbfe902aebf01f01f8896649361f1a9ba0823798642f43607986b8c397b6d61b.json similarity index 56% rename from api/.sqlx/query-07ff2b716f9e8728aa86995a5468a6da45fe5e8b91a3bf41bf477f91ea200173.json rename to api/.sqlx/query-dbfe902aebf01f01f8896649361f1a9ba0823798642f43607986b8c397b6d61b.json index ec88596..ba0c75c 100644 --- a/api/.sqlx/query-07ff2b716f9e8728aa86995a5468a6da45fe5e8b91a3bf41bf477f91ea200173.json +++ b/api/.sqlx/query-dbfe902aebf01f01f8896649361f1a9ba0823798642f43607986b8c397b6d61b.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n select exists (select id\n from sources\n where tenant_id = $1 and id = $2) as \"exists!\"\n ", + "query": "\n select exists (select id\n from app.sinks\n where tenant_id = $1 and id = $2) as \"exists!\"\n ", "describe": { "columns": [ { @@ -19,5 +19,5 @@ null ] }, - "hash": "07ff2b716f9e8728aa86995a5468a6da45fe5e8b91a3bf41bf477f91ea200173" + "hash": "dbfe902aebf01f01f8896649361f1a9ba0823798642f43607986b8c397b6d61b" } diff --git a/api/.sqlx/query-a6dcbc8e4b4902c1cd825b5d80b6ad9d24061d433cc6135f5ecaea6a9a2c62f4.json b/api/.sqlx/query-defb1d999e12327ca2840bdd3d524d1deeaa0fde8ed918157deab043cfbe911c.json similarity index 67% rename from api/.sqlx/query-a6dcbc8e4b4902c1cd825b5d80b6ad9d24061d433cc6135f5ecaea6a9a2c62f4.json rename to api/.sqlx/query-defb1d999e12327ca2840bdd3d524d1deeaa0fde8ed918157deab043cfbe911c.json index c855f42..624e304 100644 --- a/api/.sqlx/query-a6dcbc8e4b4902c1cd825b5d80b6ad9d24061d433cc6135f5ecaea6a9a2c62f4.json +++ b/api/.sqlx/query-defb1d999e12327ca2840bdd3d524d1deeaa0fde8ed918157deab043cfbe911c.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n select id, name\n from tenants\n where id = $1\n ", + "query": "\n select id, name\n from app.tenants\n where id = $1\n ", "describe": { "columns": [ { @@ -24,5 +24,5 @@ false ] }, - "hash": "a6dcbc8e4b4902c1cd825b5d80b6ad9d24061d433cc6135f5ecaea6a9a2c62f4" + "hash": "defb1d999e12327ca2840bdd3d524d1deeaa0fde8ed918157deab043cfbe911c" } diff --git a/api/.sqlx/query-5fd17de4de3f18aaa439dce48a14d5575357b71a8008344c3e6ae86b8e622bd5.json b/api/.sqlx/query-e26940eabb4fab9db623b194356ee6b54aa82f164204f072a1116c4322f78f42.json similarity index 55% rename from api/.sqlx/query-5fd17de4de3f18aaa439dce48a14d5575357b71a8008344c3e6ae86b8e622bd5.json rename to api/.sqlx/query-e26940eabb4fab9db623b194356ee6b54aa82f164204f072a1116c4322f78f42.json index 9705303..7d1c3f9 100644 --- a/api/.sqlx/query-5fd17de4de3f18aaa439dce48a14d5575357b71a8008344c3e6ae86b8e622bd5.json +++ b/api/.sqlx/query-e26940eabb4fab9db623b194356ee6b54aa82f164204f072a1116c4322f78f42.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n insert into pipelines (tenant_id, source_id, sink_id, replicator_id, publication_name, config)\n values ($1, $2, $3, $4, $5, $6)\n returning id\n ", + "query": "\n insert into app.pipelines (tenant_id, source_id, sink_id, replicator_id, publication_name, config)\n values ($1, $2, $3, $4, $5, $6)\n returning id\n ", "describe": { "columns": [ { @@ -23,5 +23,5 @@ false ] }, - "hash": "5fd17de4de3f18aaa439dce48a14d5575357b71a8008344c3e6ae86b8e622bd5" + "hash": "e26940eabb4fab9db623b194356ee6b54aa82f164204f072a1116c4322f78f42" } diff --git a/api/.sqlx/query-f5d47447d376c93bd56351469dbd09f6384d2f3c83e6e5693136c43f2c701d93.json b/api/.sqlx/query-ed21d9fe445329e510c250953a55127db6b99c6a657b28af34341f5a9531df61.json similarity index 80% rename from api/.sqlx/query-f5d47447d376c93bd56351469dbd09f6384d2f3c83e6e5693136c43f2c701d93.json rename to api/.sqlx/query-ed21d9fe445329e510c250953a55127db6b99c6a657b28af34341f5a9531df61.json index 3d9eea6..d6a5226 100644 --- a/api/.sqlx/query-f5d47447d376c93bd56351469dbd09f6384d2f3c83e6e5693136c43f2c701d93.json +++ b/api/.sqlx/query-ed21d9fe445329e510c250953a55127db6b99c6a657b28af34341f5a9531df61.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n select id, tenant_id, config\n from sinks\n where tenant_id = $1\n ", + "query": "\n select id, tenant_id, config\n from app.sinks\n where tenant_id = $1\n ", "describe": { "columns": [ { @@ -30,5 +30,5 @@ false ] }, - "hash": "f5d47447d376c93bd56351469dbd09f6384d2f3c83e6e5693136c43f2c701d93" + "hash": "ed21d9fe445329e510c250953a55127db6b99c6a657b28af34341f5a9531df61" } diff --git a/api/.sqlx/query-fb58e4b5c2e4867f9733ab5a22469b294089ef9eb285609eb50d725adffb6e79.json b/api/.sqlx/query-ee10a565cf45a6ed6122cabefa46c297648653b9aaf11399149fff1f9a779182.json similarity index 59% rename from api/.sqlx/query-fb58e4b5c2e4867f9733ab5a22469b294089ef9eb285609eb50d725adffb6e79.json rename to api/.sqlx/query-ee10a565cf45a6ed6122cabefa46c297648653b9aaf11399149fff1f9a779182.json index 10a7539..dbd9149 100644 --- a/api/.sqlx/query-fb58e4b5c2e4867f9733ab5a22469b294089ef9eb285609eb50d725adffb6e79.json +++ b/api/.sqlx/query-ee10a565cf45a6ed6122cabefa46c297648653b9aaf11399149fff1f9a779182.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n insert into queue.task_queue (name, data)\n values($1, $2) returning id\n ", + "query": "\n insert into app.task_queue (name, data)\n values($1, $2) returning id\n ", "describe": { "columns": [ { @@ -19,5 +19,5 @@ false ] }, - "hash": "fb58e4b5c2e4867f9733ab5a22469b294089ef9eb285609eb50d725adffb6e79" + "hash": "ee10a565cf45a6ed6122cabefa46c297648653b9aaf11399149fff1f9a779182" } diff --git a/api/.sqlx/query-09b545b248a172a6aed73e72ae4571e1f372f0f610ffd96e8bab32dd16a139dd.json b/api/.sqlx/query-f736572d705b2c15f88e40c27dc8bbcea58c640b3c225af61e9b584e7eea70c5.json similarity index 58% rename from api/.sqlx/query-09b545b248a172a6aed73e72ae4571e1f372f0f610ffd96e8bab32dd16a139dd.json rename to api/.sqlx/query-f736572d705b2c15f88e40c27dc8bbcea58c640b3c225af61e9b584e7eea70c5.json index 998104a..cb290bf 100644 --- a/api/.sqlx/query-09b545b248a172a6aed73e72ae4571e1f372f0f610ffd96e8bab32dd16a139dd.json +++ b/api/.sqlx/query-f736572d705b2c15f88e40c27dc8bbcea58c640b3c225af61e9b584e7eea70c5.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n insert into sources (tenant_id, config)\n values ($1, $2)\n returning id\n ", + "query": "\n insert into app.sources (tenant_id, config)\n values ($1, $2)\n returning id\n ", "describe": { "columns": [ { @@ -19,5 +19,5 @@ false ] }, - "hash": "09b545b248a172a6aed73e72ae4571e1f372f0f610ffd96e8bab32dd16a139dd" + "hash": "f736572d705b2c15f88e40c27dc8bbcea58c640b3c225af61e9b584e7eea70c5" } diff --git a/api/migrations/20240725072630_create_task_queue.sql b/api/migrations/20240725072630_create_task_queue.sql index 65c6fd3..ac3432b 100644 --- a/api/migrations/20240725072630_create_task_queue.sql +++ b/api/migrations/20240725072630_create_task_queue.sql @@ -1,8 +1,8 @@ -create schema queue; +create schema app; create table - queue.task_queue ( + app.task_queue ( id bigint generated always as identity primary key, name text not null, data JSONB not null - ); \ No newline at end of file + ); diff --git a/api/migrations/20240819111151_create_tenants.sql b/api/migrations/20240819111151_create_tenants.sql index c4c94b0..ba1e32c 100644 --- a/api/migrations/20240819111151_create_tenants.sql +++ b/api/migrations/20240819111151_create_tenants.sql @@ -1,5 +1,5 @@ create table - public.tenants ( + app.tenants ( id bigint generated always as identity primary key, name text not null ); diff --git a/api/migrations/20240821104756_create_sources.sql b/api/migrations/20240821104756_create_sources.sql index 7f7c40e..aa4d342 100644 --- a/api/migrations/20240821104756_create_sources.sql +++ b/api/migrations/20240821104756_create_sources.sql @@ -1,6 +1,6 @@ create table - public.sources ( + app.sources ( id bigint generated always as identity primary key, - tenant_id bigint references public.tenants(id) not null, + tenant_id bigint references app.tenants(id) not null, config jsonb not null ); diff --git a/api/migrations/20240822044837_create_sinks.sql b/api/migrations/20240822044837_create_sinks.sql index d7d8b1d..60f9eec 100644 --- a/api/migrations/20240822044837_create_sinks.sql +++ b/api/migrations/20240822044837_create_sinks.sql @@ -1,6 +1,6 @@ create table - public.sinks ( + app.sinks ( id bigint generated always as identity primary key, - tenant_id bigint references public.tenants(id) not null, + tenant_id bigint references app.tenants(id) not null, config jsonb not null ); diff --git a/api/migrations/20240828090309_create_images.sql b/api/migrations/20240828090309_create_images.sql index a66b955..678b05c 100644 --- a/api/migrations/20240828090309_create_images.sql +++ b/api/migrations/20240828090309_create_images.sql @@ -1,5 +1,5 @@ create table - public.images ( + app.images ( id bigint generated always as identity primary key, name text not null, is_default boolean not null diff --git a/api/migrations/20240902113739_create_replicators.sql b/api/migrations/20240902113739_create_replicators.sql index 2f9723e..370e64b 100644 --- a/api/migrations/20240902113739_create_replicators.sql +++ b/api/migrations/20240902113739_create_replicators.sql @@ -1,9 +1,9 @@ -create type replicator_status as enum ('stopped', 'starting', 'started', 'stopping'); +create type app.replicator_status as enum ('stopped', 'starting', 'started', 'stopping'); create table - public.replicators ( + app.replicators ( id bigint generated always as identity primary key, - tenant_id bigint references public.tenants(id) not null, - image_id bigint references public.images(id) not null, - status replicator_status not null + tenant_id bigint references app.tenants(id) not null, + image_id bigint references app.images(id) not null, + status app.replicator_status not null ); diff --git a/api/migrations/20240903105045_create_pipelines.sql b/api/migrations/20240903105045_create_pipelines.sql index d0021cc..cb30bbd 100644 --- a/api/migrations/20240903105045_create_pipelines.sql +++ b/api/migrations/20240903105045_create_pipelines.sql @@ -1,10 +1,10 @@ create table - public.pipelines ( + app.pipelines ( id bigint generated always as identity primary key, - tenant_id bigint references public.tenants(id) not null, - source_id bigint references public.sources(id) not null, - sink_id bigint references public.sinks(id) not null, - replicator_id bigint references public.replicators(id) not null, + tenant_id bigint references app.tenants(id) not null, + source_id bigint references app.sources(id) not null, + sink_id bigint references app.sinks(id) not null, + replicator_id bigint references app.replicators(id) not null, publication_name text not null, config jsonb not null ); diff --git a/api/src/db/images.rs b/api/src/db/images.rs index 5bdcb83..213d741 100644 --- a/api/src/db/images.rs +++ b/api/src/db/images.rs @@ -20,7 +20,7 @@ pub async fn create_image_txn( ) -> Result { let record = sqlx::query!( r#" - insert into images (name, is_default) + insert into app.images (name, is_default) values ($1, $2) returning id "#, @@ -37,7 +37,7 @@ pub async fn read_default_image(pool: &PgPool) -> Result, sqlx::Er let record = sqlx::query!( r#" select id, name, is_default - from images + from app.images where is_default = true "#, ) @@ -55,7 +55,7 @@ pub async fn read_image(pool: &PgPool, image_id: i64) -> Result, s let record = sqlx::query!( r#" select id, name, is_default - from images + from app.images where id = $1 "#, image_id, @@ -78,7 +78,7 @@ pub async fn update_image( ) -> Result, sqlx::Error> { let record = sqlx::query!( r#" - update images + update app.images set name = $1, is_default = $2 where id = $3 returning id @@ -96,7 +96,7 @@ pub async fn update_image( pub async fn delete_image(pool: &PgPool, image_id: i64) -> Result, sqlx::Error> { let record = sqlx::query!( r#" - delete from images + delete from app.images where id = $1 returning id "#, @@ -112,7 +112,7 @@ pub async fn read_all_images(pool: &PgPool) -> Result, sqlx::Error> { let mut record = sqlx::query!( r#" select id, name, is_default - from images + from app.images "#, ) .fetch_all(pool) @@ -135,8 +135,8 @@ pub async fn read_image_by_replicator_id( let record = sqlx::query!( r#" select i.id, i.name, i.is_default - from images i - join replicators r on i.id = r.image_id + from app.images i + join app.replicators r on i.id = r.image_id where r.id = $1 "#, replicator_id, diff --git a/api/src/db/pipelines.rs b/api/src/db/pipelines.rs index 811591f..acb6c5b 100644 --- a/api/src/db/pipelines.rs +++ b/api/src/db/pipelines.rs @@ -40,7 +40,7 @@ pub async fn create_pipeline( let replicator_id = create_replicator_txn(&mut txn, tenant_id, image_id).await?; let record = sqlx::query!( r#" - insert into pipelines (tenant_id, source_id, sink_id, replicator_id, publication_name, config) + insert into app.pipelines (tenant_id, source_id, sink_id, replicator_id, publication_name, config) values ($1, $2, $3, $4, $5, $6) returning id "#, @@ -66,7 +66,7 @@ pub async fn read_pipeline( let record = sqlx::query!( r#" select id, tenant_id, source_id, sink_id, replicator_id, publication_name, config - from pipelines + from app.pipelines where tenant_id = $1 and id = $2 "#, tenant_id, @@ -98,7 +98,7 @@ pub async fn update_pipeline( let config = serde_json::to_value(config).expect("failed to serialize config"); let record = sqlx::query!( r#" - update pipelines + update app.pipelines set source_id = $1, sink_id = $2, publication_name = $3, config = $4 where tenant_id = $5 and id = $6 returning id @@ -123,7 +123,7 @@ pub async fn delete_pipeline( ) -> Result, sqlx::Error> { let record = sqlx::query!( r#" - delete from pipelines + delete from app.pipelines where tenant_id = $1 and id = $2 returning id "#, @@ -143,7 +143,7 @@ pub async fn read_all_pipelines( let mut record = sqlx::query!( r#" select id, tenant_id, source_id, sink_id, replicator_id, publication_name, config - from pipelines + from app.pipelines where tenant_id = $1 "#, tenant_id, diff --git a/api/src/db/publications.rs b/api/src/db/publications.rs index eedfb23..428c1c4 100644 --- a/api/src/db/publications.rs +++ b/api/src/db/publications.rs @@ -2,7 +2,6 @@ use std::{borrow::Cow, collections::HashMap}; use serde::Serialize; use sqlx::{postgres::PgConnectOptions, Connection, Executor, PgConnection, Row}; -use tracing::error; use super::tables::Table; @@ -148,8 +147,6 @@ pub async fn read_publication( let quoted_publication_name = quote_literal(publication_name); query.push_str("ed_publication_name); - error!("QUERY: {query}"); - let mut connection = PgConnection::connect_with(options).await?; let mut tables = vec![]; diff --git a/api/src/db/replicators.rs b/api/src/db/replicators.rs index 66a4a0f..b4ebf5a 100644 --- a/api/src/db/replicators.rs +++ b/api/src/db/replicators.rs @@ -1,7 +1,7 @@ use sqlx::{PgPool, Postgres, Transaction}; #[derive(Clone, Debug, PartialEq, PartialOrd, sqlx::Type)] -#[sqlx(type_name = "replicator_status", rename_all = "lowercase")] +#[sqlx(type_name = "app.replicator_status", rename_all = "lowercase")] pub enum ReplicatorStatus { Stopped, Starting, @@ -34,8 +34,8 @@ pub async fn create_replicator_txn( ) -> Result { let record = sqlx::query!( r#" - insert into replicators (tenant_id, image_id, status) - values ($1, $2, $3::replicator_status) + insert into app.replicators (tenant_id, image_id, status) + values ($1, $2, $3::app.replicator_status) returning id "#, tenant_id, @@ -56,8 +56,8 @@ pub async fn read_replicator_by_pipeline_id( let record = sqlx::query!( r#" select r.id, r.tenant_id, r.image_id, r.status as "status: ReplicatorStatus" - from replicators r - join pipelines p on r.id = p.replicator_id + from app.replicators r + join app.pipelines p on r.id = p.replicator_id where r.tenant_id = $1 and p.tenant_id = $1 and p.id = $2 "#, tenant_id, diff --git a/api/src/db/sinks.rs b/api/src/db/sinks.rs index 2581b40..9e392ca 100644 --- a/api/src/db/sinks.rs +++ b/api/src/db/sinks.rs @@ -47,7 +47,7 @@ pub async fn create_sink( let config = serde_json::to_value(config).expect("failed to serialize config"); let record = sqlx::query!( r#" - insert into sinks (tenant_id, config) + insert into app.sinks (tenant_id, config) values ($1, $2) returning id "#, @@ -68,7 +68,7 @@ pub async fn read_sink( let record = sqlx::query!( r#" select id, tenant_id, config - from sinks + from app.sinks where tenant_id = $1 and id = $2 "#, tenant_id, @@ -93,7 +93,7 @@ pub async fn update_sink( let config = serde_json::to_value(config).expect("failed to serialize config"); let record = sqlx::query!( r#" - update sinks + update app.sinks set config = $1 where tenant_id = $2 and id = $3 returning id @@ -115,7 +115,7 @@ pub async fn delete_sink( ) -> Result, sqlx::Error> { let record = sqlx::query!( r#" - delete from sinks + delete from app.sinks where tenant_id = $1 and id = $2 returning id "#, @@ -132,7 +132,7 @@ pub async fn read_all_sinks(pool: &PgPool, tenant_id: i64) -> Result, let mut record = sqlx::query!( r#" select id, tenant_id, config - from sinks + from app.sinks where tenant_id = $1 "#, tenant_id, @@ -154,7 +154,7 @@ pub async fn sink_exists(pool: &PgPool, tenant_id: i64, sink_id: i64) -> Result< let record = sqlx::query!( r#" select exists (select id - from sinks + from app.sinks where tenant_id = $1 and id = $2) as "exists!" "#, tenant_id, diff --git a/api/src/db/sources.rs b/api/src/db/sources.rs index 2c2a36e..09a11d9 100644 --- a/api/src/db/sources.rs +++ b/api/src/db/sources.rs @@ -93,7 +93,7 @@ pub async fn create_source( let config = serde_json::to_value(config).expect("failed to serialize config"); let record = sqlx::query!( r#" - insert into sources (tenant_id, config) + insert into app.sources (tenant_id, config) values ($1, $2) returning id "#, @@ -114,7 +114,7 @@ pub async fn read_source( let record = sqlx::query!( r#" select id, tenant_id, config - from sources + from app.sources where tenant_id = $1 and id = $2 "#, tenant_id, @@ -139,7 +139,7 @@ pub async fn update_source( let config = serde_json::to_value(config).expect("failed to serialize config"); let record = sqlx::query!( r#" - update sources + update app.sources set config = $1 where tenant_id = $2 and id = $3 returning id @@ -161,7 +161,7 @@ pub async fn delete_source( ) -> Result, sqlx::Error> { let record = sqlx::query!( r#" - delete from sources + delete from app.sources where tenant_id = $1 and id = $2 returning id "#, @@ -178,7 +178,7 @@ pub async fn read_all_sources(pool: &PgPool, tenant_id: i64) -> Result Result { let record = sqlx::query!( r#" - insert into tenants (name) + insert into app.tenants (name) values ($1) returning id "#, @@ -24,7 +24,7 @@ pub async fn read_tenant(pool: &PgPool, tenant_id: i64) -> Result let record = sqlx::query!( r#" select id, name - from tenants + from app.tenants where id = $1 "#, tenant_id @@ -45,7 +45,7 @@ pub async fn update_tenant( ) -> Result, sqlx::Error> { let record = sqlx::query!( r#" - update tenants + update app.tenants set name = $1 where id = $2 returning id @@ -62,7 +62,7 @@ pub async fn update_tenant( pub async fn delete_tenant(pool: &PgPool, tenant_id: i64) -> Result, sqlx::Error> { let record = sqlx::query!( r#" - delete from tenants + delete from app.tenants where id = $1 returning id "#, @@ -78,7 +78,7 @@ pub async fn read_all_tenants(pool: &PgPool) -> Result, sqlx::Error> let mut record = sqlx::query!( r#" select id, name - from tenants + from app.tenants "#, ) .fetch_all(pool) diff --git a/api/src/queue.rs b/api/src/queue.rs index b29a9e9..386825e 100644 --- a/api/src/queue.rs +++ b/api/src/queue.rs @@ -7,7 +7,7 @@ pub async fn enqueue_task( ) -> Result { let task = sqlx::query!( r#" - insert into queue.task_queue (name, data) + insert into app.task_queue (name, data) values($1, $2) returning id "#, task_name, @@ -34,7 +34,7 @@ pub async fn dequeue_task(pool: &PgPool) -> Result let res = sqlx::query!( r#" select id, name, data - from queue.task_queue + from app.task_queue order by id limit 1 for update @@ -60,7 +60,7 @@ pub async fn dequeue_task(pool: &PgPool) -> Result pub async fn delete_task(mut txn: PgTransaction, id: i64) -> Result<(), anyhow::Error> { sqlx::query!( r#" - delete from queue.task_queue + delete from app.task_queue where id = $1 "#, id