PHP Fatal error: Cannot declare class , because the name is already in use – Laravel Migrations

Vincent Paul/ May 23, 2022/ Laravel, PHP, Programming, Technology

Please read our Disclaimer Works with -Laravel Framework 8.83.11 In case you have encountered something similar: Try to do the following: On your terminal, run the following command: If that doesn’t fix it, try to do the following: Make sure there are no existing duplicate class names in your migrations, the names are case in-sensitive, so Roles and roles will

Read More

Find any Text in any Stored Procedure

Paopatsin/ April 2, 2021/ Database, MS SQL, Technology

Please read our Disclaimer Works With-Microsoft SQL Server 2016 (RTM) – 13.0.1601.5 (X64)-Microsoft SQL Server 2014 (SP3-GDR) (KB4532095) – 12.0.6118.4 (X64) In case you need to find a certain text, a word or a string in your stored procedure assemblage, the following command will come in handy. Command: SELECT routine_name, routine_definition FROM INFORMATION_SCHEMA.ROUTINES WHERE routine_definition LIKE ‘%<replace with your text>%’

Read More

TypeError ReflectionFunction::__construct() expects parameter 1 to be string, array given

Paopatsin/ November 29, 2020/ Laravel, PHP, Programming, Technology

Please read our Disclaimer Works With-Laravel Framework 8.16.0 After a long hiatus, I’ve jumped from Laravel 5.8.30 to Laravel 8.16.0 to update my tools and that’s almost three (3) major versions I’ve missed. With a busy schedule I could not spare time to go through the change logs. And so it happens. Prior the 8.16.0 migration, I’ve used to create

Read More

Enable Shell Command in your Microsoft SQL Database Server

Paopatsin/ November 29, 2020/ Database, MS SQL, Technology

Please read our Disclaimer Works With-Microsoft SQL Server 2016 (RTM) – 13.0.1601.5 (X64)-Microsoft SQL Server 2008 (RTM) – 10.0.1600.22 (X64) As a Database Administrator, there are occasions that you would be needing to interact with the operating system from your SQL Management Studio such as running a dir check or you need to do a file import using the bcp utility

Read More

Count the Number of Records for each Database Tables in MS SQL

Paopatsin/ October 24, 2020/ Database, MS SQL, Technology

Please read our Disclaimer Works With-Microsoft SQL Server 2016 (RTM) – 13.0.1601.5 (X64)-Microsoft SQL Server 2008 (RTM) – 10.0.1600.22 (X64) In case you need a quick run of how many records (or rows) are there in your database tables. Command: Steps and Sample Usage: Open and log into your SQL Management Studio Open a New Query Windows or (CTRL+N) Copy

Read More

Search a Value from any Columns in any SQL Tables

Paopatsin/ October 9, 2020/ Database, MS SQL, Technology

Please read our Disclaimer Works With-Microsoft SQL Server 2016 (RTM) – 13.0.1601.5 (X64)-Microsoft SQL Server 2008 (RTM) – 10.0.1600.22 (X64) Savra, our new database engineer needs to check existence of a certain keyword on the database. So she went for it… Command: Steps and Sample Usage: Open and log into your SQL Management Studio Open a New Query Windows or

Read More

How to Check when a Table was Last Updated

Paopatsin/ August 22, 2020/ Database, MS SQL, Technology

Please read our Disclaimer Works With-Microsoft SQL Server 2016 (RTM) – 13.0.1601.5 (X64)-Microsoft SQL Server 2008 (RTM) – 10.0.1600.22 (X64) Command: SELECT OBJECT_NAME(OBJECT_ID) AS DatabaseName, last_user_update, * FROM sys.dm_db_index_usage_stats WHERE database_id = DB_ID(‘[replace with your database name]’) AND OBJECT_ID = OBJECT_ID(‘[replace with your table name]’) Steps and Sample Usage: Open and log into your SQL Management Studio Open a New

Read More

How to Join Unrelated SQL Tables

Paopatsin/ August 22, 2020/ Database, MS SQL, Technology

Please read our Disclaimer Works With-Microsoft SQL Server 2016 (RTM) – 13.0.1601.5 (X64) Command: SELECT d.*, p.* FROM [AdventureWorks2016].[HumanResources].[Department] d JOIN [AdventureWorks2016].[Person].[Person] p ON 1 = 1 Steps and Sample Usage: Open and log into your SQL Management Studio Open a New Query Windows or (CTRL+N) Run the following commands: (Copy and Paste the code block to your Query Window)

Read More

How to Update Microsoft SQL Account Password

Paopatsin/ August 16, 2020/ Database, MS SQL, Technology

Please read our Disclaimer Works With-Microsoft SQL Server 2016 (RTM) – 13.0.1601.5 (X64)-Microsoft SQL Server 2008 (RTM) – 10.0.1600.22 (X64) If you are an Database Administrator chances are you’ve came across few request adding new users to the database, aside, the company should have stricter rules implementing security across the organization as such keeping passwords up to date and adherence

Read More