-
Notifications
You must be signed in to change notification settings - Fork 68
Description
- 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.