Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why can't I run migrations with bee tool -conn with environment variables #860

Open
TheNickFury opened this issue Aug 22, 2023 · 4 comments

Comments

@TheNickFury
Copy link

Hello guys, I'm new to using Beego. I'm trying to use migrations via the command line

bee migrate -driver=postgres -con="host=$host user=$user"

go 1.20.6 bee 2.1.0

but I'm currently struggling to insert environment variables.

Is it possible?

I'm probably doing something wrong... Is there another way to perform migrations? Perhaps using the orm.RunSyncdb method?

@flycash
Copy link
Collaborator

flycash commented Aug 30, 2023

-conn?

@TheNickFury
Copy link
Author

Yes sorry -conn.. how do I put environment variables inside the connection?

@flycash
Copy link
Collaborator

flycash commented Aug 30, 2023

I check the docs but do not find the related usage case. But I think you can use the linux command like -conn=(cat >xxx).

@flycash
Copy link
Collaborator

flycash commented Aug 30, 2023

sorry, I am not good at linux command, you can google it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants