4 Commits

Author SHA1 Message Date
Râu Cao
0f3b9f176e 0.8.1
All checks were successful
continuous-integration/drone/push Build is passing
2023-09-03 15:35:46 +02:00
822ae2f945 Merge pull request 'Fix migration failing with PostgreSQL' (#145) from bugfix/144-postgres_migration into master
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #145
2023-09-03 13:32:36 +00:00
Râu Cao
96c669ab4e Update database schema, fix spec
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Release Drafter / Update release notes draft (pull_request) Successful in 2s
2023-09-03 15:29:09 +02:00
Râu Cao
558100c35e Fix migration failing with PostgreSQL 2023-09-03 15:28:32 +02:00
4 changed files with 8 additions and 6 deletions

View File

@@ -1,9 +1,12 @@
class CreateRemoteStorageAuthorizations < ActiveRecord::Migration[7.0]
def change
db_type = ActiveRecord::Base.configurations.find_db_config(Rails.env).adapter
array_default = db_type == "postgresql" ? [] : [].to_yaml
create_table :remote_storage_authorizations do |t|
t.references :user, null: false, foreign_key: true
t.string :token
t.text :permissions, array: true, default: [].to_yaml
t.text :permissions, array: true, default: array_default
t.string :client_id
t.string :redirect_uri
t.string :app_name

View File

@@ -84,13 +84,12 @@ ActiveRecord::Schema[7.0].define(version: 2023_05_23_120753) do
t.datetime "confirmed_at", precision: nil
t.datetime "confirmation_sent_at", precision: nil
t.string "unconfirmed_email"
t.text "ln_login_ciphertext"
t.text "ln_password_ciphertext"
t.string "ln_account"
t.string "nostr_pubkey"
t.datetime "remember_created_at"
t.string "remember_token"
t.text "preferences"
t.string "nostr_pubkey"
t.index ["email"], name: "index_users_on_email", unique: true
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
end

View File

@@ -11,7 +11,7 @@
"postcss-preset-env": "^7.8.3",
"tailwindcss": "^3.2.4"
},
"version": "0.8.0",
"version": "0.8.1",
"scripts": {
"build:css:tailwind": "tailwindcss --postcss -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application.css",
"build:css": "yarn run build:css:tailwind"

View File

@@ -25,7 +25,7 @@ RSpec.describe CreateLndhubAccountJob, type: :job do
context "with existing credentials stored" do
before do
user.ln_login = "foo"
user.ln_account = "foo"
user.ln_password = "bar"
user.save!
end
@@ -36,7 +36,7 @@ RSpec.describe CreateLndhubAccountJob, type: :job do
expect(WebMock).to_not have_requested(:post, "http://localhost:3023/create")
user.reload
expect(user.ln_login).to eq("foo")
expect(user.ln_account).to eq("foo")
expect(user.ln_password).to eq("bar")
end
end