wawandco / ox Goto Github PK
View Code? Open in Web Editor NEWThe Ox CLI
Home Page: https://oxcli.com
License: MIT License
The Ox CLI
Home Page: https://oxcli.com
License: MIT License
In the following command invocation the name of the migration should have not been type_sqls
it seems like the flag is being taken as the name.
ox generate migration --type=sql move_users_to_be_people
[info] Using cmd/ox/main.go
[info] generated: /Users/paganotoni/code/paganotoni/agnte/migrations/20220215165209_type_sqls.up.sql
[info] generated: /Users/paganotoni/code/paganotoni/agnte/migrations/20220215165209_type_sqls.down.sql
cc @dmuriel
Part of resetting the database should be redoing migrations. At the moment the database ends up empty.
One of the things we need to build here is a base of integration tests that allows us to guarantee the stability of the CLI at the highest level possible.
When creating a new project with ox it throws the following error when running:
jquery-exposed-exposed.js? ./ node_modules / expose-loader / dist / cjs.js? exposes = $, jQuery: 5 Uncaught Error: [exposes-loader] The "$" value exists in the global scope, it may not be safe to overwrite it, use the "override" option
my solution for this problem was to remove the first line from the application.js file
require ("expose-loader? exposes = $, jQuery! jquery");
Hello.
Do you think it would be a good idea to create an API flag option when generating a new app with Ox?
So when you run ox new square_api --api
it creates a minimalist version of the things that Ox generates right now.
ox version: v0.11.2
I created a new buffalo project with the ox new
command. When finished I noticed that the number of git changes was above 10000+, immediately I noticed this was caused by the node_modules folder, then I noticed that the .gitignote file was missing inside the new project folder.
Currently generating a model only generates well.. the model. Generating a model should also generate its migrations.
Running ox db --help
outputs:
$ ox db --help
[info] Using github.com/wawandco/ox/cmd/ox
Usage of create:
--conn string the name of the connection to use (default "development")
Usage of drop:
--conn string the name of the connection to use (default "development")
Usage of reset:
--conn string the name of the connection to use (default "development")
Usage of new:
-f, --force clear existing folder if found.
Usage of standard/builder:
-o, --output string the path the binary will be generated at
--static build a static binary using --ldflags '-linkmode external -extldflags "-static"' (default true)
--tags strings tags to pass the go build command
Usage of type:
-t, --type string the type of the migration (default "fizz")
[error] unable to find pop config file
[error] subcommand `--help` not found
Seems that it needs a bit of tweaking.
When running ox version
we get the following output:
ox version v0.11.2
Currently, the Dockerfile is using a docker image with an old Golang version (1.16)
The migration generator seems to be generating an up migration with create_tablename
as the name of the table. When it should be tablename
.
p.e.
ox g migration create_users
Generates:
create_table("create_users") {
...
}
cc @dmuriel
A typical error is to run migrations or even worse, reset a database on an environment that is not development, this happens because in some cases the database connection is set in the environment.
To catch possible issues DB commands should confirm when DATABASE_URL is not the same as the one in the current GO_ENV by asking the developer to continue with the operation.
⚠️ Heads up! DATABASE_URL does not match current environment.
> Detail:
DATABASE_URL: postgres://user:[email protected]/production
ENVIRONMENT: postgres://user:pass@development/development
Are you sure you want to continue? (y/N)
>
ox version: v0.11.2
I created a new buffalo project with the ox new coke
command.
Then created a couple fizz files and tried to run them using the following command:
ox db migrate
But I got the following error:
[error] subcommand migrate not found
When running ox help db
to check what sub commands are available, I have:
Based on this, there seems to be no migrate
sub-command available.
As a side note, I'm using the globally available ox command.
I'm not sure if this is a bug or not. But I was trying to create a new project (empty folder) and I type ox help
and the following error was returned:
[error] go.mod not found
I think that no matter if the folder you are located is a Ox project or not, but the help command should always return the list of commands available.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.