abizvn-media 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/serializers/abizvn/media/album_serializer.rb +3 -3
- data/lib/abizvn/media/version.rb +1 -1
- data/spec/serializers/abizvn/media/album_serializer_spec.rb +1 -1
- data/spec/serializers/abizvn/media/image_serializer_spec.rb +1 -1
- data/spec/serializers/abizvn/media/video_serializer_spec.rb +1 -1
- data/spec/support/general_validation_helpers.rb +12 -9
- data/spec/support/media_validation_helpers.rb +58 -37
- metadata +2 -192
- data/spec/dummy/Rakefile +0 -6
- data/spec/dummy/app/assets/config/manifest.js +0 -3
- data/spec/dummy/app/assets/stylesheets/application.css +0 -15
- data/spec/dummy/app/channels/application_cable/channel.rb +0 -4
- data/spec/dummy/app/channels/application_cable/connection.rb +0 -4
- data/spec/dummy/app/controllers/application_controller.rb +0 -4
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/jobs/application_job.rb +0 -7
- data/spec/dummy/app/mailers/application_mailer.rb +0 -4
- data/spec/dummy/app/models/application_record.rb +0 -3
- data/spec/dummy/app/views/layouts/application.html.erb +0 -22
- data/spec/dummy/app/views/layouts/mailer.html.erb +0 -13
- data/spec/dummy/app/views/layouts/mailer.text.erb +0 -1
- data/spec/dummy/app/views/pwa/manifest.json.erb +0 -22
- data/spec/dummy/app/views/pwa/service-worker.js +0 -26
- data/spec/dummy/bin/rails +0 -4
- data/spec/dummy/bin/rake +0 -4
- data/spec/dummy/bin/rubocop +0 -8
- data/spec/dummy/bin/setup +0 -37
- data/spec/dummy/config/application.rb +0 -42
- data/spec/dummy/config/boot.rb +0 -3
- data/spec/dummy/config/cable.yml +0 -10
- data/spec/dummy/config/database.yml +0 -32
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -81
- data/spec/dummy/config/environments/production.rb +0 -105
- data/spec/dummy/config/environments/test.rb +0 -67
- data/spec/dummy/config/initializers/assets.rb +0 -12
- data/spec/dummy/config/initializers/content_security_policy.rb +0 -25
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -8
- data/spec/dummy/config/initializers/inflections.rb +0 -16
- data/spec/dummy/config/initializers/new_framework_defaults_7_2.rb +0 -70
- data/spec/dummy/config/initializers/permissions_policy.rb +0 -13
- data/spec/dummy/config/locales/en.yml +0 -31
- data/spec/dummy/config/puma.rb +0 -34
- data/spec/dummy/config/routes.rb +0 -3
- data/spec/dummy/config/storage.yml +0 -34
- data/spec/dummy/config.ru +0 -6
- data/spec/dummy/db/migrate/20250314031817_create_general_settings.abizvn_general.rb +0 -12
- data/spec/dummy/db/migrate/20250314031818_add_index_into_general_settings.abizvn_general.rb +0 -6
- data/spec/dummy/db/migrate/20250314031819_review_general_setting.abizvn_general.rb +0 -7
- data/spec/dummy/db/migrate/20250314031820_create_entity_status_collection.abizvn_general.rb +0 -28
- data/spec/dummy/db/migrate/20250314031821_add_mandatory_fields.abizvn_general.rb +0 -8
- data/spec/dummy/db/migrate/20250314032045_create_active_storage_tables.active_storage.rb +0 -57
- data/spec/dummy/db/migrate/20250314032115_add_service_name_to_active_storage_blobs.active_storage.rb +0 -22
- data/spec/dummy/db/migrate/20250314032116_create_active_storage_variant_records.active_storage.rb +0 -27
- data/spec/dummy/db/migrate/20250314032117_remove_not_null_on_active_storage_blobs_checksum.active_storage.rb +0 -8
- data/spec/dummy/db/schema.rb +0 -101
- data/spec/dummy/files/sample-5s.mp4 +0 -0
- data/spec/dummy/files/sample.txt +0 -1
- data/spec/dummy/files/small.png +0 -0
- data/spec/dummy/log/development.log +0 -456
- data/spec/dummy/log/test.log +0 -4121
- data/spec/dummy/public/404.html +0 -67
- data/spec/dummy/public/406-unsupported-browser.html +0 -66
- data/spec/dummy/public/422.html +0 -67
- data/spec/dummy/public/500.html +0 -66
- data/spec/dummy/public/icon.png +0 -0
- data/spec/dummy/public/icon.svg +0 -3
- data/spec/dummy/public/robots.txt +0 -1
- data/spec/dummy/storage/development.sqlite3 +0 -0
- data/spec/dummy/storage/test.sqlite3 +0 -0
- data/spec/dummy/tmp/local_secret.txt +0 -1
- data/spec/dummy/tmp/storage/0m/wv/0mwvr3j9l29cw4p7m418uq9d62k2 +0 -0
- data/spec/dummy/tmp/storage/0p/ts/0ptsb0ri8tvl6vn5pve7xa1iuoht +0 -0
- data/spec/dummy/tmp/storage/0u/ct/0uctup2q5pdsfqcpq1ygt5zecvxu +0 -0
- data/spec/dummy/tmp/storage/0u/dr/0udrvy8w6qq1q1wyk3zmoh4fz01e +0 -0
- data/spec/dummy/tmp/storage/10/z8/10z8c5gqsghrv5rmxjot023ax09x +0 -0
- data/spec/dummy/tmp/storage/18/y9/18y9uamy1uld9xhlokeepsp9jmvc +0 -0
- data/spec/dummy/tmp/storage/1h/se/1hsezcfourfde1h4p5cbkvv5birp +0 -0
- data/spec/dummy/tmp/storage/1r/19/1r19gppb0x5cm7u9wx33oqk4opxl +0 -0
- data/spec/dummy/tmp/storage/29/zg/29zg0x46emqnj725yhh6ufg7z9px +0 -0
- data/spec/dummy/tmp/storage/2b/qj/2bqjr4v0qyg6y951wuos3qnftfw6 +0 -0
- data/spec/dummy/tmp/storage/2f/2k/2f2kbf9ia5f11kfatr97gjdjujh7 +0 -0
- data/spec/dummy/tmp/storage/2y/li/2yli8pqtu3uuzqe2vvwfywljwqsw +0 -0
- data/spec/dummy/tmp/storage/35/w4/35w4vfuebk1419dswgnmf5ri2smw +0 -0
- data/spec/dummy/tmp/storage/39/lr/39lr1lbfnjbmdlr78kkad3ix0r8x +0 -0
- data/spec/dummy/tmp/storage/3i/u2/3iu2w6b5at6asrpzvc47m7x0zyre +0 -0
- data/spec/dummy/tmp/storage/3j/a8/3ja82g7kf3xzfgvh7m54c0lvwjz7 +0 -0
- data/spec/dummy/tmp/storage/3p/l7/3pl730tq59vblbzxzhh1zpyctuk1 +0 -0
- data/spec/dummy/tmp/storage/3r/cp/3rcpn2tdlrix5u28u9zzdf80tmff +0 -0
- data/spec/dummy/tmp/storage/3v/n5/3vn5oqb03sblmkrnpcfberlfjief +0 -0
- data/spec/dummy/tmp/storage/45/fk/45fkekg9g6gttnddhvhbxccjo8ah +0 -0
- data/spec/dummy/tmp/storage/4b/71/4b71himq8ri2al7619qnrstqdi32 +0 -0
- data/spec/dummy/tmp/storage/4n/ls/4nls3n87i5jx1c3y1bia2cpwdqyn +0 -0
- data/spec/dummy/tmp/storage/5f/cm/5fcmj3v74nmwqmdj7jyog2w4efhr +0 -0
- data/spec/dummy/tmp/storage/5q/36/5q36vl8epg5t73u78ljzg4x1ib1o +0 -0
- data/spec/dummy/tmp/storage/5q/af/5qafqiphplmbusg3rlpk329cwclj +0 -0
- data/spec/dummy/tmp/storage/5w/r8/5wr8iu817l0i1xutyj4g7a6bwrj3 +0 -0
- data/spec/dummy/tmp/storage/6a/m9/6am9u4rq9l8wl5ppb5terh03m4hl +0 -0
- data/spec/dummy/tmp/storage/71/od/71odizjahavvxbj119xq7a5kdktk +0 -0
- data/spec/dummy/tmp/storage/80/ah/80ahzc9z7g1rlqlns4lo1jpbun73 +0 -0
- data/spec/dummy/tmp/storage/8g/qb/8gqb5wiqh1wk7o1ilsbe7nw8jkl6 +0 -0
- data/spec/dummy/tmp/storage/8o/5n/8o5nc1myeh3c5fafcxrdt0fybv8x +0 -0
- data/spec/dummy/tmp/storage/9e/t2/9et2wnpb06saq1qw9vkdknlul31t +0 -0
- data/spec/dummy/tmp/storage/a5/os/a5oslea9cgmfnqczx55g17xrz07d +0 -0
- data/spec/dummy/tmp/storage/b3/b5/b3b53qdh3e45etxaot17iyec14ca +0 -0
- data/spec/dummy/tmp/storage/b4/ek/b4ekvi6c9szhw8lqehv7u7kubsiz +0 -0
- data/spec/dummy/tmp/storage/bb/2f/bb2fvwhiu8i5qf2pyz7mtzqed49n +0 -0
- data/spec/dummy/tmp/storage/bk/hs/bkhs8l9n4d09f81weejb9a31jk7n +0 -0
- data/spec/dummy/tmp/storage/bx/sq/bxsqwu541rqbcnx85r0keylo8yjg +0 -0
- data/spec/dummy/tmp/storage/cc/rs/ccrsp7k0x7hlxw5ylyqesfycnsn0 +0 -0
- data/spec/dummy/tmp/storage/cn/rt/cnrt2re92df7ncrgsykeidjzxl34 +0 -0
- data/spec/dummy/tmp/storage/dk/oh/dkohvjmkw575f2fyuv9bdi1fqojh +0 -0
- data/spec/dummy/tmp/storage/du/bp/dubpmx8zzqkiof4a01xcze08vgob +0 -0
- data/spec/dummy/tmp/storage/eh/j7/ehj7ihockopsa5arfi9oldipwf3l +0 -0
- data/spec/dummy/tmp/storage/er/vz/ervzydqq909udjcjkjxr7ydkdx1c +0 -0
- data/spec/dummy/tmp/storage/ev/k2/evk288iduktjxochqcd4ocxpvnxa +0 -0
- data/spec/dummy/tmp/storage/f4/md/f4mdb9wn7yinnrcdr9iznwc7mpfk +0 -0
- data/spec/dummy/tmp/storage/fj/ld/fjldv9v7tuate6niwvednipftxt7 +0 -0
- data/spec/dummy/tmp/storage/fn/46/fn4643u1em8lrft0f7qme2hfnepo +0 -0
- data/spec/dummy/tmp/storage/fq/0s/fq0smpzifdnry4xgmyfae3la9mmt +0 -0
- data/spec/dummy/tmp/storage/g6/zl/g6zlj189sqtj9g4rv86tpfeyq6bu +0 -0
- data/spec/dummy/tmp/storage/ge/ih/geihjrxbvovjnfkgx3t5cp8f4osm +0 -0
- data/spec/dummy/tmp/storage/gi/pl/gipl41n57oxeu3usjj41z7o766k0 +0 -0
- data/spec/dummy/tmp/storage/h3/bz/h3bzvzpoqppi1te5v4xvp76e7ybo +0 -0
- data/spec/dummy/tmp/storage/h7/vh/h7vhyaqp1g1nau1mzr1afuit4o2a +0 -0
- data/spec/dummy/tmp/storage/hf/i6/hfi6fat6xxcxqzknna451khsg14j +0 -0
- data/spec/dummy/tmp/storage/hi/2p/hi2p1p2sinhnbi6g2hpfeewaptmd +0 -0
- data/spec/dummy/tmp/storage/hj/kr/hjkrdxojxekkyxv08bnlgnbwuy1v +0 -0
- data/spec/dummy/tmp/storage/hu/dw/hudwprs1ig3d437jxqargs6rwtwp +0 -0
- data/spec/dummy/tmp/storage/hz/8w/hz8w7stqgq83xlndjxxurzz9u76v +0 -0
- data/spec/dummy/tmp/storage/hz/kx/hzkxn0gfhalk0lw27f3x7gbk0b8v +0 -0
- data/spec/dummy/tmp/storage/ih/rc/ihrclsjt3qnw9ig7foy5lz6orqay +0 -0
- data/spec/dummy/tmp/storage/ih/xz/ihxzelkuehnqebshhb3ah4z1c1fk +0 -0
- data/spec/dummy/tmp/storage/j4/08/j408pnd9nuf88tbmb9cjj52qvgfh +0 -0
- data/spec/dummy/tmp/storage/jj/4o/jj4obafz48kk8o5yj6lh59143gn8 +0 -0
- data/spec/dummy/tmp/storage/jp/om/jpom7a8cedvu7gjtw8d9rgwrlqwt +0 -0
- data/spec/dummy/tmp/storage/jq/o9/jqo96rlq9wd9ne90y798smj95opn +0 -0
- data/spec/dummy/tmp/storage/jq/pd/jqpdh488lkoif5o2ibimj44oeykl +0 -0
- data/spec/dummy/tmp/storage/jv/0x/jv0xnfr9q6n40wctvybueshwsm5y +0 -0
- data/spec/dummy/tmp/storage/kn/u8/knu87cjyme0ntuds19kaqkdquj3o +0 -0
- data/spec/dummy/tmp/storage/kp/xi/kpxike9som55n7r0v31ij2wr0kda +0 -0
- data/spec/dummy/tmp/storage/kw/pz/kwpz3kfc96d2mltp45hf4jbss1c5 +0 -0
- data/spec/dummy/tmp/storage/l7/hp/l7hp8y22igxn1ai3oxiyaoov5u6x +0 -0
- data/spec/dummy/tmp/storage/l8/qm/l8qmangooniwtzu5m5fiashbauey +0 -0
- data/spec/dummy/tmp/storage/ma/0m/ma0m88bf7chmz13a6tji6hlwjnc9 +0 -0
- data/spec/dummy/tmp/storage/md/y3/mdy32tddxsijmn8dzhaxiavj63ml +0 -0
- data/spec/dummy/tmp/storage/mw/sk/mwskudeppm3i1yxkmmjdl9yjkag0 +0 -0
- data/spec/dummy/tmp/storage/n7/hi/n7hi26phltz0dg8ke1qt1u027puz +0 -0
- data/spec/dummy/tmp/storage/nc/98/nc98yg9a1li9vbwsxepbwyvd1lq5 +0 -0
- data/spec/dummy/tmp/storage/nl/14/nl149p53kg31lkyssqfub168zlv3 +0 -0
- data/spec/dummy/tmp/storage/np/6a/np6a0zpx5s9kiyfoy52n1399acfx +0 -0
- data/spec/dummy/tmp/storage/nw/xx/nwxxho9izqznkvp201in548ryyn5 +0 -0
- data/spec/dummy/tmp/storage/nw/yh/nwyhfx82lx42l9cw01x62faml69h +0 -0
- data/spec/dummy/tmp/storage/ny/sh/nyshk4vcjap9z1h719z31w3equsu +0 -0
- data/spec/dummy/tmp/storage/o5/bk/o5bkt43h6w72ra8ovveor8znzjx4 +0 -0
- data/spec/dummy/tmp/storage/om/uf/omufz8eo8ge1weuptt6rqoeyv9eg +0 -0
- data/spec/dummy/tmp/storage/p6/y7/p6y797a8hmia83td07jte009xwi8 +0 -0
- data/spec/dummy/tmp/storage/p7/xn/p7xn4yotfmav3iakeqd6d8pvxoy1 +0 -0
- data/spec/dummy/tmp/storage/p9/x3/p9x3dqgn2p16xqjkc825appnox1z +0 -0
- data/spec/dummy/tmp/storage/ph/t8/pht8stocj9jea0xzav7anp8wcpt5 +0 -0
- data/spec/dummy/tmp/storage/q2/l2/q2l29qiotvirswsiry9bqcl5fq02 +0 -0
- data/spec/dummy/tmp/storage/q7/r5/q7r5nkez9cdu5degph822duu5x9d +0 -0
- data/spec/dummy/tmp/storage/q9/r6/q9r64jnzfhezzqodwge88g942mv0 +0 -0
- data/spec/dummy/tmp/storage/qd/5b/qd5bpor1awhe36h3nc73jin0cjiw +0 -0
- data/spec/dummy/tmp/storage/qu/w2/quw2vekfqjusa3fzzni7qidq1lv5 +0 -0
- data/spec/dummy/tmp/storage/r5/vn/r5vnn41etkqr9tcj9bct5xxrw0is +0 -0
- data/spec/dummy/tmp/storage/rb/96/rb96stbba0bjuhq6chrjbid8vbwx +0 -0
- data/spec/dummy/tmp/storage/rp/z5/rpz5mpqg45j7qb508wm6pya8f4v6 +0 -0
- data/spec/dummy/tmp/storage/s6/oh/s6ohck2beb42wb4jtl627zyhcjfj +0 -0
- data/spec/dummy/tmp/storage/sh/49/sh49j0e04hvsmujei1x8gduaojcz +0 -0
- data/spec/dummy/tmp/storage/ti/ky/tikypd1wumyyagiscy376io0lfiq +0 -0
- data/spec/dummy/tmp/storage/tl/ov/tlov083h70q2569ljnnorrms3xzy +0 -0
- data/spec/dummy/tmp/storage/ty/hu/tyhud4vinp00cr6pmnbpafo8ejf2 +0 -0
- data/spec/dummy/tmp/storage/uc/w1/ucw1qyoxhilndsaqihtonzec0dyh +0 -0
- data/spec/dummy/tmp/storage/ue/tu/uetusdeo9wpvtxlnxdasgy4g571h +0 -0
- data/spec/dummy/tmp/storage/um/nl/umnlqwj9iv7krwfn3s6g5vvv7nfi +0 -0
- data/spec/dummy/tmp/storage/um/w9/umw93cizx7laocmj8wwmnf8mmgk4 +0 -0
- data/spec/dummy/tmp/storage/uv/2m/uv2mi0xh894cnozzb7cqu09gqdpd +0 -0
- data/spec/dummy/tmp/storage/vi/i4/vii4euezr9ff0xu5ap7yyd00j3m9 +0 -0
- data/spec/dummy/tmp/storage/vn/g2/vng2onfy77nzprmy1yks40c0ye7g +0 -0
- data/spec/dummy/tmp/storage/w4/f9/w4f9wjrbmlksnbsth36c5ghybfj2 +0 -0
- data/spec/dummy/tmp/storage/we/6i/we6i04d0sxtguite5sm9hj1e74p5 +0 -0
- data/spec/dummy/tmp/storage/we/ot/weot8dwpp4ghagb6yudcza5s4b7e +0 -0
- data/spec/dummy/tmp/storage/wu/or/wuory3h00sk3mjovjy00gjpj5yem +0 -0
- data/spec/dummy/tmp/storage/wy/4r/wy4rkcqcpfif8argydum4mwpobn1 +0 -0
- data/spec/dummy/tmp/storage/xc/8f/xc8fv92nr83tpv8m1f9b2rz3hayg +0 -0
- data/spec/dummy/tmp/storage/xn/ce/xncehxpgg48jx675w0lx3osvhsvj +0 -0
- data/spec/dummy/tmp/storage/xn/pb/xnpbuj5ns40ddefjrsdevdehzeko +0 -0
- data/spec/dummy/tmp/storage/y0/ln/y0ln0x3dfo4cfi3pepkesodpfko0 +0 -0
- data/spec/dummy/tmp/storage/y4/nf/y4nfgp8pb33kscy5vbqcl1an8eqe +0 -0
- data/spec/dummy/tmp/storage/ye/bl/yeblxiqcymv7z2bqpwf5jkhrh3ae +0 -0
- data/spec/dummy/tmp/storage/yg/49/yg49usle0eexi8grfhozlne6auw1 +0 -0
- data/spec/dummy/tmp/storage/yl/0a/yl0adttsitq4x2z1oniu9z5jw46y +0 -0
- data/spec/dummy/tmp/storage/yy/kf/yykfwro4gjqrtk3kvo03xgrmve4l +0 -0
- data/spec/dummy/tmp/storage/z8/y6/z8y6inrrgivm0niw39os5nhoihv6 +0 -0
- data/spec/dummy/tmp/storage/zb/j7/zbj7wmend3hkuy7l4nee84zc10fz +0 -0
- data/spec/dummy/tmp/storage/zh/vc/zhvciv6eu20eaivgldcah0q86hcc +0 -0
- data/spec/dummy/tmp/storage/zz/ei/zzeie82wsfok4of0e96y7v0zrzit +0 -0
@@ -1,12 +0,0 @@
|
|
1
|
-
# This migration comes from abizvn_general (originally 20241115080211)
|
2
|
-
class CreateGeneralSettings < ActiveRecord::Migration[7.2]
|
3
|
-
def change
|
4
|
-
create_table :general_settings do |t|
|
5
|
-
t.string :group
|
6
|
-
t.string :code
|
7
|
-
t.string :value
|
8
|
-
|
9
|
-
t.timestamps
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
@@ -1,6 +0,0 @@
|
|
1
|
-
# This migration comes from abizvn_general (originally 20241116110614)
|
2
|
-
class AddIndexIntoGeneralSettings < ActiveRecord::Migration[7.2]
|
3
|
-
def change
|
4
|
-
add_index :general_settings, [:group, :code], unique: true, name: 'index_general_settings_group_and_code'
|
5
|
-
end
|
6
|
-
end
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# This migration comes from abizvn_general (originally 20250104054920)
|
2
|
-
class ReviewGeneralSetting < ActiveRecord::Migration[7.2]
|
3
|
-
def change
|
4
|
-
add_column :general_settings, :order, :integer, null: false, default: 0
|
5
|
-
add_column :general_settings, :active, :boolean, null: false, default: true
|
6
|
-
end
|
7
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# This migration comes from abizvn_general (originally 20250218110737)
|
2
|
-
class CreateEntityStatusCollection < ActiveRecord::Migration[7.2]
|
3
|
-
def up
|
4
|
-
Abizvn::General::GeneralSetting.find_or_create_by!(group: Abizvn::General::ENTITY_STATUS_GROUP_NAME, code: Abizvn::General::ENTITY_STATUS_CODE_DRAFT) do |entity|
|
5
|
-
entity.value = 'Draft'
|
6
|
-
end
|
7
|
-
Abizvn::General::GeneralSetting.find_or_create_by!(group: Abizvn::General::ENTITY_STATUS_GROUP_NAME, code: Abizvn::General::ENTITY_STATUS_CODE_PUBLIC) do |entity|
|
8
|
-
entity.value = 'Public'
|
9
|
-
end
|
10
|
-
Abizvn::General::GeneralSetting.find_or_create_by!(group: Abizvn::General::ENTITY_STATUS_GROUP_NAME, code: Abizvn::General::ENTITY_STATUS_CODE_INVISIBLE) do |entity|
|
11
|
-
entity.value = 'Unlist'
|
12
|
-
end
|
13
|
-
Abizvn::General::GeneralSetting.find_or_create_by!(group: Abizvn::General::ENTITY_STATUS_GROUP_NAME, code: Abizvn::General::ENTITY_STATUS_CODE_PRIVATE) do |entity|
|
14
|
-
entity.value = 'Private'
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def down
|
19
|
-
list_codes = [
|
20
|
-
Abizvn::General::ENTITY_STATUS_CODE_DRAFT,
|
21
|
-
Abizvn::General::ENTITY_STATUS_CODE_PUBLIC,
|
22
|
-
Abizvn::General::ENTITY_STATUS_CODE_INVISIBLE,
|
23
|
-
Abizvn::General::ENTITY_STATUS_CODE_PRIVATE
|
24
|
-
]
|
25
|
-
|
26
|
-
Abizvn::General::GeneralSetting.where(group: Abizvn::General::ENTITY_STATUS_GROUP_NAME, code: list_codes).destroy_all
|
27
|
-
end
|
28
|
-
end
|
@@ -1,8 +0,0 @@
|
|
1
|
-
# This migration comes from abizvn_general (originally 20250220044935)
|
2
|
-
class AddMandatoryFields < ActiveRecord::Migration[7.2]
|
3
|
-
def change
|
4
|
-
change_column_null :general_settings, :group, false
|
5
|
-
change_column_null :general_settings, :code, false
|
6
|
-
change_column_null :general_settings, :value, false
|
7
|
-
end
|
8
|
-
end
|
@@ -1,57 +0,0 @@
|
|
1
|
-
# This migration comes from active_storage (originally 20170806125915)
|
2
|
-
class CreateActiveStorageTables < ActiveRecord::Migration[7.0]
|
3
|
-
def change
|
4
|
-
# Use Active Record's configured type for primary and foreign keys
|
5
|
-
primary_key_type, foreign_key_type = primary_and_foreign_key_types
|
6
|
-
|
7
|
-
create_table :active_storage_blobs, id: primary_key_type do |t|
|
8
|
-
t.string :key, null: false
|
9
|
-
t.string :filename, null: false
|
10
|
-
t.string :content_type
|
11
|
-
t.text :metadata
|
12
|
-
t.string :service_name, null: false
|
13
|
-
t.bigint :byte_size, null: false
|
14
|
-
t.string :checksum
|
15
|
-
|
16
|
-
if connection.supports_datetime_with_precision?
|
17
|
-
t.datetime :created_at, precision: 6, null: false
|
18
|
-
else
|
19
|
-
t.datetime :created_at, null: false
|
20
|
-
end
|
21
|
-
|
22
|
-
t.index [ :key ], unique: true
|
23
|
-
end
|
24
|
-
|
25
|
-
create_table :active_storage_attachments, id: primary_key_type do |t|
|
26
|
-
t.string :name, null: false
|
27
|
-
t.references :record, null: false, polymorphic: true, index: false, type: foreign_key_type
|
28
|
-
t.references :blob, null: false, type: foreign_key_type
|
29
|
-
|
30
|
-
if connection.supports_datetime_with_precision?
|
31
|
-
t.datetime :created_at, precision: 6, null: false
|
32
|
-
else
|
33
|
-
t.datetime :created_at, null: false
|
34
|
-
end
|
35
|
-
|
36
|
-
t.index [ :record_type, :record_id, :name, :blob_id ], name: :index_active_storage_attachments_uniqueness, unique: true
|
37
|
-
t.foreign_key :active_storage_blobs, column: :blob_id
|
38
|
-
end
|
39
|
-
|
40
|
-
create_table :active_storage_variant_records, id: primary_key_type do |t|
|
41
|
-
t.belongs_to :blob, null: false, index: false, type: foreign_key_type
|
42
|
-
t.string :variation_digest, null: false
|
43
|
-
|
44
|
-
t.index [ :blob_id, :variation_digest ], name: :index_active_storage_variant_records_uniqueness, unique: true
|
45
|
-
t.foreign_key :active_storage_blobs, column: :blob_id
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
private
|
50
|
-
def primary_and_foreign_key_types
|
51
|
-
config = Rails.configuration.generators
|
52
|
-
setting = config.options[config.orm][:primary_key_type]
|
53
|
-
primary_key_type = setting || :primary_key
|
54
|
-
foreign_key_type = setting || :bigint
|
55
|
-
[ primary_key_type, foreign_key_type ]
|
56
|
-
end
|
57
|
-
end
|
data/spec/dummy/db/migrate/20250314032115_add_service_name_to_active_storage_blobs.active_storage.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# This migration comes from active_storage (originally 20190112182829)
|
2
|
-
class AddServiceNameToActiveStorageBlobs < ActiveRecord::Migration[6.0]
|
3
|
-
def up
|
4
|
-
return unless table_exists?(:active_storage_blobs)
|
5
|
-
|
6
|
-
unless column_exists?(:active_storage_blobs, :service_name)
|
7
|
-
add_column :active_storage_blobs, :service_name, :string
|
8
|
-
|
9
|
-
if configured_service = ActiveStorage::Blob.service.name
|
10
|
-
ActiveStorage::Blob.unscoped.update_all(service_name: configured_service)
|
11
|
-
end
|
12
|
-
|
13
|
-
change_column :active_storage_blobs, :service_name, :string, null: false
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
def down
|
18
|
-
return unless table_exists?(:active_storage_blobs)
|
19
|
-
|
20
|
-
remove_column :active_storage_blobs, :service_name
|
21
|
-
end
|
22
|
-
end
|
data/spec/dummy/db/migrate/20250314032116_create_active_storage_variant_records.active_storage.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
# This migration comes from active_storage (originally 20191206030411)
|
2
|
-
class CreateActiveStorageVariantRecords < ActiveRecord::Migration[6.0]
|
3
|
-
def change
|
4
|
-
return unless table_exists?(:active_storage_blobs)
|
5
|
-
|
6
|
-
# Use Active Record's configured type for primary key
|
7
|
-
create_table :active_storage_variant_records, id: primary_key_type, if_not_exists: true do |t|
|
8
|
-
t.belongs_to :blob, null: false, index: false, type: blobs_primary_key_type
|
9
|
-
t.string :variation_digest, null: false
|
10
|
-
|
11
|
-
t.index %i[ blob_id variation_digest ], name: "index_active_storage_variant_records_uniqueness", unique: true
|
12
|
-
t.foreign_key :active_storage_blobs, column: :blob_id
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
private
|
17
|
-
def primary_key_type
|
18
|
-
config = Rails.configuration.generators
|
19
|
-
config.options[config.orm][:primary_key_type] || :primary_key
|
20
|
-
end
|
21
|
-
|
22
|
-
def blobs_primary_key_type
|
23
|
-
pkey_name = connection.primary_key(:active_storage_blobs)
|
24
|
-
pkey_column = connection.columns(:active_storage_blobs).find { |c| c.name == pkey_name }
|
25
|
-
pkey_column.bigint? ? :bigint : pkey_column.type
|
26
|
-
end
|
27
|
-
end
|
@@ -1,8 +0,0 @@
|
|
1
|
-
# This migration comes from active_storage (originally 20211119233751)
|
2
|
-
class RemoveNotNullOnActiveStorageBlobsChecksum < ActiveRecord::Migration[6.0]
|
3
|
-
def change
|
4
|
-
return unless table_exists?(:active_storage_blobs)
|
5
|
-
|
6
|
-
change_column_null(:active_storage_blobs, :checksum, true)
|
7
|
-
end
|
8
|
-
end
|
data/spec/dummy/db/schema.rb
DELETED
@@ -1,101 +0,0 @@
|
|
1
|
-
# This file is auto-generated from the current state of the database. Instead
|
2
|
-
# of editing this file, please use the migrations feature of Active Record to
|
3
|
-
# incrementally modify your database, and then regenerate this schema definition.
|
4
|
-
#
|
5
|
-
# This file is the source Rails uses to define your schema when running `bin/rails
|
6
|
-
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
|
7
|
-
# be faster and is potentially less error prone than running all of your
|
8
|
-
# migrations from scratch. Old migrations may fail to apply correctly if those
|
9
|
-
# migrations use external dependencies or application code.
|
10
|
-
#
|
11
|
-
# It's strongly recommended that you check this file into your version control system.
|
12
|
-
|
13
|
-
ActiveRecord::Schema[7.2].define(version: 2025_03_14_032117) do
|
14
|
-
create_table "active_storage_attachments", force: :cascade do |t|
|
15
|
-
t.string "name", null: false
|
16
|
-
t.string "record_type", null: false
|
17
|
-
t.bigint "record_id", null: false
|
18
|
-
t.bigint "blob_id", null: false
|
19
|
-
t.datetime "created_at", null: false
|
20
|
-
t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
|
21
|
-
t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
|
22
|
-
end
|
23
|
-
|
24
|
-
create_table "active_storage_blobs", force: :cascade do |t|
|
25
|
-
t.string "key", null: false
|
26
|
-
t.string "filename", null: false
|
27
|
-
t.string "content_type"
|
28
|
-
t.text "metadata"
|
29
|
-
t.string "service_name", null: false
|
30
|
-
t.bigint "byte_size", null: false
|
31
|
-
t.string "checksum"
|
32
|
-
t.datetime "created_at", null: false
|
33
|
-
t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
|
34
|
-
end
|
35
|
-
|
36
|
-
create_table "active_storage_variant_records", force: :cascade do |t|
|
37
|
-
t.bigint "blob_id", null: false
|
38
|
-
t.string "variation_digest", null: false
|
39
|
-
t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true
|
40
|
-
end
|
41
|
-
|
42
|
-
create_table "general_settings", force: :cascade do |t|
|
43
|
-
t.string "group", null: false
|
44
|
-
t.string "code", null: false
|
45
|
-
t.string "value", null: false
|
46
|
-
t.datetime "created_at", null: false
|
47
|
-
t.datetime "updated_at", null: false
|
48
|
-
t.integer "order", default: 0, null: false
|
49
|
-
t.boolean "active", default: true, null: false
|
50
|
-
t.index ["group", "code"], name: "index_general_settings_group_and_code", unique: true
|
51
|
-
end
|
52
|
-
|
53
|
-
create_table "media_albums", force: :cascade do |t|
|
54
|
-
t.string "title", limit: 256, null: false
|
55
|
-
t.text "description", limit: 2048
|
56
|
-
t.integer "status_id"
|
57
|
-
t.datetime "created_at", null: false
|
58
|
-
t.datetime "updated_at", null: false
|
59
|
-
t.index ["status_id"], name: "index_media_albums_on_status_id"
|
60
|
-
end
|
61
|
-
|
62
|
-
create_table "media_albums_images", force: :cascade do |t|
|
63
|
-
t.integer "album_id"
|
64
|
-
t.integer "image_id"
|
65
|
-
t.datetime "created_at", null: false
|
66
|
-
t.datetime "updated_at", null: false
|
67
|
-
t.index ["album_id"], name: "index_media_albums_images_on_album_id"
|
68
|
-
t.index ["image_id"], name: "index_media_albums_images_on_image_id"
|
69
|
-
end
|
70
|
-
|
71
|
-
create_table "media_albums_videos", force: :cascade do |t|
|
72
|
-
t.integer "album_id"
|
73
|
-
t.integer "video_id"
|
74
|
-
t.datetime "created_at", null: false
|
75
|
-
t.datetime "updated_at", null: false
|
76
|
-
t.index ["album_id"], name: "index_media_albums_videos_on_album_id"
|
77
|
-
t.index ["video_id"], name: "index_media_albums_videos_on_video_id"
|
78
|
-
end
|
79
|
-
|
80
|
-
create_table "media_images", force: :cascade do |t|
|
81
|
-
t.string "description"
|
82
|
-
t.string "link"
|
83
|
-
t.datetime "created_at", null: false
|
84
|
-
t.datetime "updated_at", null: false
|
85
|
-
end
|
86
|
-
|
87
|
-
create_table "media_videos", force: :cascade do |t|
|
88
|
-
t.string "description"
|
89
|
-
t.string "link"
|
90
|
-
t.datetime "created_at", null: false
|
91
|
-
t.datetime "updated_at", null: false
|
92
|
-
end
|
93
|
-
|
94
|
-
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
|
95
|
-
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
|
96
|
-
add_foreign_key "media_albums", "general_settings", column: "status_id"
|
97
|
-
add_foreign_key "media_albums_images", "media_albums", column: "album_id"
|
98
|
-
add_foreign_key "media_albums_images", "media_images", column: "image_id"
|
99
|
-
add_foreign_key "media_albums_videos", "media_albums", column: "album_id"
|
100
|
-
add_foreign_key "media_albums_videos", "media_videos", column: "video_id"
|
101
|
-
end
|
Binary file
|
data/spec/dummy/files/sample.txt
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Sample text file
|
data/spec/dummy/files/small.png
DELETED
Binary file
|