You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I run this command: cornucopia live postgres://ogreets3:0gr33t5@localhost:5432/og3_CornucopiaMe
No error. Nearly instant processing. It didn't generate anything, really.
My cornucopia.rs file looks like this:
// This file was generated with `cornucopia`. Do not modify.
#[allow(clippy::all, clippy::pedantic)] #[allow(unused_variables)]
#[allow(unused_imports)] #[allow(dead_code)] pub mod types { } #[allow(clippy::all, clippy::pedantic)] #[allow(unused_variables)]
#[allow(unused_imports)] #[allow(dead_code)] pub mod queries
{ }
Next:
I try 'schema' command:
aaron@aaron-hp:~/Documents/cornucopia_test$ cornucopia schema ./database_sql.sql
Error: × Couldn't establish a connection with the database.
├─▶ error communicating with the server: Connection reset by peer (os error 104)
╰─▶ Connection reset by peer (os error 104)
I run it again:
2)
same error...
3)
same error...
aaron@aaron-hp:~/Documents/cornucopia_test$ cornucopia schema ./database_sql.sql
Error: × Couldn't establish a connection with the database.
├─▶ error communicating with the server: Connection reset by peer (os error 104)
╰─▶ Connection reset by peer (os error 104)
after about 10 attempts and errors, I retry and finally get a generated cornucopia.rs file...
and it's the same:
// This file was generated with `cornucopia`. Do not modify.
#[allow(clippy::all, clippy::pedantic)] #[allow(unused_variables)]
#[allow(unused_imports)] #[allow(dead_code)] pub mod types { } #[allow(clippy::all, clippy::pedantic)] #[allow(unused_variables)]
#[allow(unused_imports)] #[allow(dead_code)] pub mod queries
{ }
I can assure you that the SQL file and the DB have dozens of tables and then about a dozen alter table add foreign_key statements, such that there should be something, or at least an error if not.
The text was updated successfully, but these errors were encountered:
FWIW, I can process the same database fine with other tools.
(relevant = https://github.com/ptechen/sql_reverse is capable of looping through the tables)
I would also say that the Cornucopia book is great, it looks really nice.
I think it could use at least 1 or 2 CLI examples:
one for 'schema' and one for 'live'.
My cornucopia.rs file looks like this:
Next:
I try 'schema' command:
aaron@aaron-hp:~/Documents/cornucopia_test$ cornucopia schema ./database_sql.sql
Error: × Couldn't establish a connection with the database.
├─▶ error communicating with the server: Connection reset by peer (os error 104)
╰─▶ Connection reset by peer (os error 104)
I run it again:
2)
same error...
3)
same error...
aaron@aaron-hp:~/Documents/cornucopia_test$ cornucopia schema ./database_sql.sql
Error: × Couldn't establish a connection with the database.
├─▶ error communicating with the server: Connection reset by peer (os error 104)
╰─▶ Connection reset by peer (os error 104)
and it's the same:
I can assure you that the SQL file and the DB have dozens of tables and then about a dozen alter table add foreign_key statements, such that there should be something, or at least an error if not.
The text was updated successfully, but these errors were encountered: