Connecting laravel voyager to an existing table - laravel

Does anyone know how to connect voyager to an existing table?
If the table doesn't exits one would go to Database=>Create and specify a name and columns and create a table which would display at the tables list but what do we do when there is a table?
I tried just filling the form and clicked the "Create new table" button and received "table already exists" error which was obvious.

If the table is already present in the same database as of your laravel project. Then it should be displayed in your list of tables under the Voyager->Databases
For ex : In the below snapshot, there was a table 'testtbl' which was already created by me. So it is getting reflected in the "Voyager => Databases"

Related

I got an error during Data migration from Magento 1.9 to Magento 2.4

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'm2loom_live.customer_entity_back' doesn't exist, query was: SELECT DISTINCT child.custome r_id FROM authorlogin_customer AS child
LEFT JOIN customer_entity_back AS parent ON child.customer_id = parent.entity_id WHERE (child.customer_id IS NOT NULL) AND (parent.entity_id IS NUL
L)
enter image description here
Looking at that table name (m2loom_live) I'm guessing that table comes from an extension or a customization you may have put in. Those tables need to exist before you can migrate their rows to your new database. To do that you will need to either install the Magento 2 version of that extension or recreate your module and add an install script (or better yet a db_schema.xml) file, and then run bin/magento setup:upgrade to create the table. Then you should be able to migrate the data to your new database.
If you don't want to keep that table then you will have to modify or extend the data-migration-tool's mapping files to tell it to ignore that table instead of trying to migrate its data. I'm not 100% on this part, but I think the mapping file you would want to edit would be map.xml and you would add:
<document_rules><!-- This is the element you need to add your configuration too -->
...
<ignore>
<document>Your Table Here</document>
</ignore>

create a drop down in laravel 7 with list values from postgres database, and insert in another text field from the same database

i am new to laravel 7, i have a postgres database table contact with two columns name and email id. the drop menu values will list the values from the name column, the corresponding value in email id has to displayed in the adjacent text box.
could you guys please help with code, in terms of view and controller.
Thanks

How to resolve error ORA-20987: APEX - ORA-02015?

I have a page in apex with multiple interactive grid. In one of the interactive grid i am trying to update the data of a column of a table in the database. The column named defect kind is a dropdown in the grid and on click of save should be able to updated the column value in database with the selected value in the grid.
While clicking on save apex is showing an error as follows:
Ajax call returned server error ORA-20987: APEX - ORA-02015: cannot select FOR UPDATE from remote table for.
I have used the type interactive grid - automatic row processing(DML) for saving the grid. Only defect kind is selected by the user rest all column value are coming directly from the table.
Interactive grid image:
NOTE:For this workspace the tables are accessed through a database link. I am using APEX 5.1.
This error is raised specifically because you are working over a database link.
Error code: ORA-02015
Description: cannot select FOR UPDATE from remote table
Cause: An attempt was made to select FOR UPDATE on a remote table (directly, or via a view) that had abstract data type columns, and the
view or select list contained abstract data type columns or non-column
items.
Action: To attempt a select FOR UPDATE, use a view or select list that consists only of base columns from the remote table, none of
which may be abstract data type columns.
I can't tell from what you've posted if the issue is with the query you're using to populate the IG or with some underlying view or the table itself. Depending your ability to locate and remove the "abstract data type columns or non-column items" (if that's even possible with an IG) you may not be able to make this work with automatic row processing over a database link at all. It may require a custom PL/SQL API instead.
Have you tried to set the attribute Lock Row (group Settings) to No in your Interactive Grid - automatic row processing(DML) process?

Laravel Migration create table from existing table

I am working on such application where table audit should perform to make revision of updated records. Let's say for example I have to log each field update in Users update.
I wants to create clone of existing user table by
CREATE TABLE users_audit LIKE users;
My main question is,
Is there any alternative way or provision in Laravel migration to create table from existing table ?
I know we can run raw sql query in migration up/down method using \DB::raw();
But it would be helpful if any helper function available to create table from existing table like, create or table
Yes, you can, see the below link
Click this link
This statement is used to execute raw queries
DB::statement('CREATE TABLE tablename LIKE existingtablename');

How to drop a table with a period/full stop in Oracle Apex?

One of my classes using APEX Oracle had a couple of tables named with periods that I added to Apex successfully but now I'm unable to delete them.
The tables are named like
classid.groupid_table_name
I've tried going through the UI trying to find a way to manually drop the tables and have also run the scripts:
drop table classid.groupid_table_name cascade constraints;
which gets the error "ORA-00942: table or view does not exist"
and
drop table [classid.groupid_table_name] cascade constraints;
which gets the error "ORA-00903: invalid table name"
The tables aren't really doing anything bad they're just kind of cluttering up the workspace since the naming scheme has since been changed to classid_groupid_table_name.
Have you tried, the following:
drop table "classid.groupid_table_name" cascade constraints;

Resources