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)
- Default null arg for stored procedures not supported HOT 3
- Error: postgres: unexpected trigger relation kind "p" HOT 2
- SQL Server driver generating invalid SQL for down migration pre-checks HOT 1
- Invalid definitions for COLUMNSTORE and SPATIAL Indexes for SQL Server
- Dynamic Table Names / Schema Names not Supported HOT 2
- <atlas schema inspect>Issue when password has an at sign HOT 3
- CVE in github.com/vektah/gqlparser/v2 dependency HOT 4
- Error: drop "<view_name>" view: pq: cannot drop view <view_name> because other objects depend on it HOT 1
- Unique Constraints is not being applied HOT 2
- Generate SQL migration scripts doesn
- Customizing DDL generation in HCL HOT 3
- Support for system versioned tables in MariaDB
- atlas-operator cannot be download using terraform
- Correct imports so gazelle (a bazel build tool) can inspect and construct bazel build files HOT 1
- Support Logical-Replication Subscriptions in PostgreSQL
- bug: `altas schema diff` misbehaves when tables share a constraint name HOT 2
- Support for Clickhouse NOT NULL table column HOT 6
- offer more verifiable installation methods HOT 2
- cannot enable atlas-migrator to reset (clean) a database HOT 2
- support for Oracle dialect? 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.