Skip to content

empty cornucopia.rs file after running CLI live command against local Postgres. #260

@aaronpeacock

Description

@aaronpeacock
  1. I run this command: cornucopia live postgres://ogreets3:0gr33t5@localhost:5432/og3_CornucopiaMe
  2. 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)

  1. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions