How to add a foreign key to an existing table

Hi I’m using laravel 10 and wanted to add a foreign key to an already existing table public function up(): void { Schema::disableForeignKeyConstraints(); Schema::table(‘channels’, function (Blueprint $table) { $table->foreignIdFor(App\Models\User::class) ->after(‘name’) ->constrained(); }); Schema::enableForeignKeyConstraints(); } public function down(): void { Schema::table(‘channels’, function (Blueprint $table) { $table->dropForeign([‘user_id’]); $table->dropColumn(‘user_id’); }); } I disabled the foreign key verification with … Read more

Azure Functions Logger with BeginScope for ApplicationInsights

We have an Azure Function app that is enabled for HttpLogging to emit the logs to Azure ApplicationInsights using the following code, var host = new HostBuilder() .ConfigureFunctionsWorkerDefaults((_, b) => { }, _ => { }) .ConfigureServices((c, s) => { s.AddTransient<HttpLoggingHandler>(); s.AddHttpClient(“WithLogger”).AddHttpMessageHandler<HttpLoggingHandler>(); s.AddApplicationInsightsTelemetryWorkerService(); s.ConfigureFunctionsApplicationInsights(); } Also, we have used the following in our logging handler, … Read more

filter inside liveware in v3 – how to get filter state in filament?

i have designed a filter inside liveware in filament-v2 and i was getting the state also inside getTableQuery() by using getTableFilters function (provided below) $month_selected = $this->getTableFilterState(“attendance_month”)[“value”];but after upgrading to v3 i am not getting filter state . to check i have provided some customized code like below inside filters of table in liveware . … Read more

Cannot reach Postgres Flexible Server from Web App

I have a Django app to deploy with a pipeline in azure DevOps and deploy To Azure cloud resources. The Django database is a Postgres Flexible Server in the same resource group. Also I have a virtual network resource in the Group. The pipeline install dependencies and then exec the tests from a command in … Read more

wait for a promise of promises

Im trying to download a bucket from S3 async function downloadBucketRaw(buckt, prefix) { return s3.listObjectsV2({ Bucket: buckt, Prefix: prefix }, (err, obj) => { if (err) return console.log(err); var promises = [] obj.Contents.forEach(element => { if (element.Size > 0) { var p = downloadFileFromS3({ Bucket: buckt, Key: element.Key }); promises.push(p) } }); return promises }); … Read more

Issue transcoding H.265 to H.264 stream with FFMPEG

I’m having an issue trying to do some tests restreaming an H.265 stream to H.264 as follows: I use a MP4 file as video source, then I use VLC to stream it with H.265 codec as follows: I go to media -> stream menu, then select a file and stream: The second step allows me … Read more