Comments (7)
I think I have reduced it down, but not sure why.
atlas schema apply -d "postgres://postgres:<pwd>@localhost:26432/postgres?sslmode=disable" -f main.hcl
# main.hcl
table "states" {
schema = schema.public
column "config_id" {
null = false
type = uuid
}
column "end_at" {
null = true
type = timestamp_without_time_zone(6)
}
foreign_key "states_id_fkey" {
columns = [table.states.column.config_id]
ref_columns = [table.configs.column.id]
on_update = "NO ACTION"
on_delete = "CASCADE"
}
index "states_config_id_end_at" {
on {
column = table.states.column.config_id
}
on {
desc = true
column = table.states.column.end_at
}
unique = true
}
}
table "configs" {
schema = schema.public
column "id" {
null = false
type = uuid
}
column "name" {
null = true
type = character_varying(255)
}
primary_key {
columns = [table.configs.column.id]
}
}
schema "public" {
}
from atlas.
Thanks for reporting this @bodinsamuel ! Your example
was spot on in helping us triage the issue. Working on a fix now. Will update soon!
from atlas.
Hi @bodinsamuel 👋
Thanks for reporting this issue,
Is there a simple way for us to reproduce?
Thanks.
from atlas.
Hey @bodinsamuel, can you please check if you get this without the -w
?
from atlas.
seems to work without the -w
it output my schema correctly.
I guess my db has some unexpected keyword, but I can not share the schema since it's company property.
I tried to find a minimum schema to reproduce but seems "random" even though it's probably not ^^
I'll try to dig more
from atlas.
Hi @bodinsamuel ,
Thanks again for the hcl schema, it really helped us solve this issue and a fix can be found in our latest URL:
curl -LO https://release.ariga.io/atlas/atlas-darwin-amd64-latest
atlas CLI version
v0.3.3-92362a3e1558-canary
from atlas.
it works 🙏🏻
thanks !
from atlas.
Related Issues (20)
- Fix the URL parsing for special characters. HOT 2
- Running atlas commands against cockroachdb returns error with postgres wire protocol HOT 2
- Add Postgres 15+ support for security = INVOKER
- Feature Request: Support for `SET configuration_parameter { TO value | = value | FROM CURRENT }` in Function Definition Syntax HOT 2
- Declarative workflow breaks on YugabyteDB HOT 6
- Atlas HCL Syntax: String Not Recognized by Linter HOT 5
- [Multi-file schema]: Allow glob pattern for `env.src` HOT 2
- [Multi-file schema / vsCode extension]: Load related schema files into extension context HOT 5
- [vsCode extension]: Do not require schema files to end in `.pg.hcl` HOT 1
- Go 1.23 support with ent schema loader HOT 4
- Possible patch release 0.26.1 HOT 1
- Intermittent errors on Atlas schema inspect SQL Server using docker (Terraform) HOT 5
- `Unknown variable; There is no variable named "PLpgSQL".` when creating Function HOT 4
- `atlas migrate lint` takes very long HOT 1
- Atlas can't revert back data type that already changed HOT 2
- migrate apply fails first apply to CockroachDB v24.2 HOT 1
- Jetbrains IntelliJ Plugin and Code Folding
- The unique index constraint was not updated after adding a new field. HOT 5
- Incorrect migration DDL generated for simple views with `null as` HOT 5
- schema inspect can not parse url correctly with '#' in password HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atlas.