Comment by Schwern on Passing env variable inputs to a reusable workflow...
@vampyfreak You don't have to edit the reusable workflow. You have to change how you're calling it. The information about how to pass variables and secrets to the reusable workflow will be inside the...
View ArticleComment by Schwern on Unable to migrate table using GORM
Assuming line 15 of migrate.go is initializers.DB.Debug().AutoMigrate(post), check that post is not nil.
View ArticleComment by Schwern on UNIQUE constraint failed when I insert "10" when "1"...
@Zebrafish Datatypes in SQLite covers how type affinity works.
View ArticleAnswer by Schwern for Unable to migrate table using GORM
The failure is in the Debug call. initializers.DB is invalid. It was never initialized.The problem is here... DB, err := gorm.Open(postgres.Open(dsn), &gorm.Config{})DB, err := declares local DB...
View ArticleAnswer by Schwern for What is the rails way to update a price field before...
self.price = printf('$%.2f',totprice)This does not set the price, it prints it. printf is for printing and returns nil so that does self.price = nil. You want sprintf.If price is a number you probably...
View ArticleAnswer by Schwern for How to make branch folder case sensitive in fork git gui
Git branches start as literal files. When you create Feature-IB/test that creates the file .git/refs/heads/Feature-IB/test (later it might be "packed" into a packfile). If your directory is not...
View ArticleComment by Schwern on Getting Table Column Value Based on Dynamic Column Name
This is a very problematic table design. If you ask another question about what you're solving with this design, we might be able to help. There's probably a better way. For example, dataTable could be...
View ArticleComment by Schwern on Why is git log significantly slower when outputting to...
Try git --no-pager log --no-color.
View ArticleComment by Schwern on Why is git log significantly slower when outputting to...
15618 refs would explain it. Decoration has to go searching through all those refs to find which are associated with the commit ID. Before packing that meant reading 15618 files on disk. After packing...
View ArticleComment by Schwern on Undo git fetch --prune with explicit refs (undo...
git fetch --prune will only delete remote tracking branches. It will not delete local branches.
View ArticleComment by Schwern on Rails 7.2 - unexpected behaviour with duration and...
A suggestion: don't store the duration. Calculate it from start_datetime and end_datetime as needed, or add a generated column. Then you don't need this code. Also consider using a single tstzrange...
View ArticleAnswer by Schwern for Getting Table Column Value Based on Dynamic Column Name
Any guidance appreciated, even if it's a different way to think the problem.Redesign dataTable to be a key/value table like so...create table dataTable ( cid integer not null, key varchar(255) not...
View ArticleComment by Schwern on Get all missing records with conditions on other two...
Could you provide sample data and results, please?
View ArticleAnswer by Schwern for Why do I keep having "access denied" although I used...
In search_username_in_csv, if stored_username == stored_username{ will always be true, so it will always pick the first line of the CSV.I think you meant if stored_username == username {There should...
View ArticleAnswer by Schwern for What is the best way to handles comments related to...
If you do one table like (table name, foreign id, ...) you lose referential integrity and important things like on delete cascade. These can be restored with triggers, but it's a lot of work and a lot...
View ArticleComment by Schwern on Rows matching conditions in a directly related table or...
Could you provide sample data and results, please?
View ArticleComment by Schwern on Loading .csv into mySQL database - Error 1290 still...
This question is similar to: How should I resolve --secure-file-priv in MySQL?. Particularly the second answer about local data infile local. If you believe it’s different, please [edit] the question,...
View ArticleAnswer by Schwern for Pointer receiver methods are getting called on...
Your pointer String method is not being called. That is expected behavior, pointer methods cannot be called on values for the reasons you gave.{old 12} is the default output for a struct. See fmt...
View ArticleAnswer by Schwern for Difference between job and worker in rails
It isn't a fair question.While @dbugger is correct that, generally, a "worker" processes a "job", Rails doesn't use the term "worker" in relation to "jobs".Where Rails does use the term "worker"...
View ArticleComment by Schwern on Pointer receiver methods do not get called interface...
@tusharRawat I've added to the answer, I hope that makes it more clear.
View Article