I have scenario when I have to iterate through multiple tables in quite big sqlite database. In tables I store informations about planet position on sky through years. So e.g. for Mars I have tables Mars_2000, Mars_2001 and so on. Table structure is always the same: Thing is that for certain task I need to iterate through this tables, which
Tag: rust
Postgres & Rust R2D2: How to get array_to_json as text/string without the escaped double quotes?
I have the following SQL: This gives me following in PSQL: When I put a ::text: I still get the same: However on my rust app’s side using r2d2_postgres, I get an escaped string instead: Rust code: Outputs: How I can I prevent the escaping of double quotes? Answer The quotes are only escaped during printing. They are not escaped
How to re-run Diesel migrations?
I’m using Diesel with PostgreSQL. I added my migrations, and they worked fine, outputting everything in the schema.rs file. Until I noticed that I was missing the created_at fields on some of my migrations. I edited the SQL and ran diesel migration run. Nothing happened, no errors, no success. Is there a way to fix this and re-run my migrations?