faustinoaq changed the topic of #amber to: Welcome to Amber Framework community! | https://amberframework.org | Developer happiness, productivity and bare metal performance | GH: https://github.com/amberframework | Docs: https://docs.amberframework.org | Gitter: https://gitter.im/amberframework/amber | IRC Logger: https://irclog.whitequark.org/amber | Amber::Server.start
<FromGitter> <basilthesecond_gitlab> @robacarp you would agree though that having to write sql every time I change a model especially during development is not the most convenient, right?
<FromGitter> <Blacksmoke16> imo if you have to change your tables that much during dev might want to devote some time to thinking out your tables before continuing dev work?
<FromGitter> <basilthesecond_gitlab> well I would love to set my tables in stone and I've thought about it. Unfortunately I think i have too many uncertainties as to what the tables will look like at the end.
<FromGitter> <basilthesecond_gitlab> also @Blacksmoke16 isn't that what `amber db migrate` is supposed to do?
<FromGitter> <basilthesecond_gitlab> kind of unclear on that one
<FromGitter> <robacarp> @basilthesecond_gitlab there is some inconvenience, but it doesn’t affect my workflow. Writing web applications often requires SQL anyway, along with HTML, CSS, some variant of JavaScript, etc
<FromGitter> <robacarp> The migrate command runs all outstanding migrations
<FromGitter> <basilthesecond_gitlab> ok because `amber db migrate` doesn't run for me when I change the tables, since as the error message suggests `table already exists`
<FromGitter> <basilthesecond_gitlab> Yeah, let me know if I'm missing something about the tools that I need or if they don't exist I can make something myself. If I sound too confrontational I'm sorry that's not what I intend to come across as.
<FromGitter> <TsumiNa> Hi, I tried to use docker as the development env and found some errors. 1) `crystal deps` in the Dockerfile that created by the `amber new` command is outdated, should be replaced by `shards install`; 2) `DB::Connector` initialized before run the `Amber::Server.configure` block, that means using *ENVIRONMENT variables* will not be reflected. To move all these `require` statement except `require "amber"` in
<FromGitter> ... `config/application.cr` to the end can fix 2) but I don't know whether this is the best.
feepbot has quit [Ping timeout: 248 seconds]
feepbot has joined #amber
<FromGitter> <Blacksmoke16> @basilthesecond_gitlab i assume you arent trying to recreate the table in a later migration?
<FromGitter> <Blacksmoke16> i.e. if you create the table in your first migration, should be doing `alter table` on the others?
<FromGitter> <drujensen> @basilthesecond_gitlab you can use `amber m model Post name:string` to generate a model and migration script
<FromGitter> <drujensen> another option is to create a bin/migrate script that uses the built in migrator for development. `Parent.migrator.drop_and_create`
<FromGitter> <basilthesecond_gitlab> ah @Blacksmoke16 thanks i'll try that instead
<FromGitter> <basilthesecond_gitlab> @drujensen yeah that doesn't work unless I delete my old migration
<FromGitter> <basilthesecond_gitlab> if I understand correctly that's just `amber db drop create` right?
FromGitter has quit [Remote host closed the connection]
hightower5 has joined #amber
hightower6 has quit [Ping timeout: 260 seconds]